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 Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected Stringprotected CorePropertiesprotected org.springframework.core.env.Environmentprotected Stringprotected Stringprotected intprotected Stringprotected OffsetDateTime -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected com.google.gson.JsonArrayprotected voidprotected com.google.gson.JsonObjectgetHost()intgetPort()voidinit()protected voidinitValues(org.springframework.context.ConfigurableApplicationContext context) voidonApplicationReady(org.springframework.boot.context.event.ApplicationReadyEvent event) protected voidprotected Pathprotected Stringprotected StringresolveFullUrl(String protocol, String host, int port, String contextPath) protected Stringprotected intresolvePort(org.springframework.context.ConfigurableApplicationContext context) protected Stringprotected voidprotected void
-
Field Details
-
APP_INFO_DIR_NAME
- See Also:
-
APP_INFO_FILE_NAME
- See Also:
-
environment
@Autowired protected org.springframework.core.env.Environment environment -
coreProperties
-
host
-
port
protected int port -
contextPath
-
protocol
-
fullUrl
-
activeProfiles
-
startupTime
-
-
Constructor Details
-
ApplicationInfoProvider
public ApplicationInfoProvider()
-
-
Method Details
-
onApplicationReady
@EventListener public void onApplicationReady(org.springframework.boot.context.event.ApplicationReadyEvent event) -
getHost
-
getPort
public int getPort() -
getContextPath
-
getProtocol
-
getFullUrl
-
getActiveProfiles
-
getStartupTime
-
initValues
protected void initValues(org.springframework.context.ConfigurableApplicationContext context) -
resolveProtocol
-
resolveHost
-
resolvePort
protected int resolvePort(org.springframework.context.ConfigurableApplicationContext context) -
resolveContextPath
-
resolveActiveProfiles
-
resolveFullUrl
-
createAppInfoFile
protected void createAppInfoFile() -
createJson
protected com.google.gson.JsonObject createJson() -
writeFile
-
resolveAppInfoFileLocation
-
createActiveProfilesJsonArray
protected com.google.gson.JsonArray createActiveProfilesJsonArray() -
shutdownHookOperation
protected void shutdownHookOperation() -
removeAppInfoFile
protected void removeAppInfoFile() -
init
@PostConstruct public void init()
-