Package io.jmix.core

Class ApplicationInfoProvider

java.lang.Object
io.jmix.core.ApplicationInfoProvider

@Component("core_ApplicationInfoProvider") @ConditionalOnClass(org.springframework.boot.web.server.context.WebServerApplicationContext.class) public class ApplicationInfoProvider extends Object
  • Field Details

    • APP_INFO_DIR_NAME

      protected static final String APP_INFO_DIR_NAME
      See Also:
    • APP_INFO_FILE_NAME

      protected static final String APP_INFO_FILE_NAME
      See Also:
    • environment

      @Autowired protected org.springframework.core.env.Environment environment
    • coreProperties

      @Autowired protected CoreProperties coreProperties
    • host

      protected String host
    • port

      protected int port
    • contextPath

      protected String contextPath
    • protocol

      protected String protocol
    • fullUrl

      protected String fullUrl
    • activeProfiles

      protected List<String> activeProfiles
    • startupTime

      protected OffsetDateTime startupTime
  • Constructor Details

    • ApplicationInfoProvider

      public ApplicationInfoProvider()
  • Method Details

    • onApplicationReady

      @EventListener public void onApplicationReady(org.springframework.boot.context.event.ApplicationReadyEvent event)
    • getHost

      public String getHost()
    • getPort

      public int getPort()
    • getContextPath

      public String getContextPath()
    • getProtocol

      public String getProtocol()
    • getFullUrl

      public String getFullUrl()
    • getActiveProfiles

      public List<String> getActiveProfiles()
    • getStartupTime

      public OffsetDateTime getStartupTime()
    • initValues

      protected void initValues(org.springframework.context.ConfigurableApplicationContext context)
    • resolveProtocol

      protected String resolveProtocol()
    • resolveHost

      protected String resolveHost()
    • resolvePort

      protected int resolvePort(org.springframework.context.ConfigurableApplicationContext context)
    • resolveContextPath

      protected String resolveContextPath()
    • resolveActiveProfiles

      protected List<String> resolveActiveProfiles()
    • resolveFullUrl

      protected String resolveFullUrl(String protocol, String host, int port, String contextPath)
    • createAppInfoFile

      protected void createAppInfoFile()
    • createJson

      protected com.google.gson.JsonObject createJson()
    • writeFile

      protected void writeFile(Path fileLocation, com.google.gson.JsonObject json)
    • resolveAppInfoFileLocation

      protected Path resolveAppInfoFileLocation()
    • createActiveProfilesJsonArray

      protected com.google.gson.JsonArray createActiveProfilesJsonArray()
    • shutdownHookOperation

      protected void shutdownHookOperation()
    • removeAppInfoFile

      protected void removeAppInfoFile()
    • init

      @PostConstruct public void init()