Application state information 4657#5261
Conversation
| } | ||
|
|
||
| protected Path resolveAppInfoFileLocation() { | ||
| String confDir = coreProperties.getConfDir(); |
There was a problem hiding this comment.
Are you using conf dir intentionally, to be cleaned on startup?
There was a problem hiding this comment.
File is stored to <conf>/app-info/app-info.json according to request from Studio.
This file is explicitly removed on shutdown via shutdown hook - cleanConf task can be disabled.
| return root; | ||
| } | ||
|
|
||
| protected void writeFile(Path fileLocation, JsonObject json) { |
There was a problem hiding this comment.
As far as I understand, in the current implementation the file will be written even in production when using an embedded web server. I think we need an application property to disable writing the file. For example jmix.application-info-file.enabled
There was a problem hiding this comment.
Added jmix.core.application-info-file-enabled property to fit current core properties structure. true by default.
|
|
||
| @Component("core_ApplicationInfoProvider") | ||
| @ConditionalOnClass(WebServerApplicationContext.class) | ||
| public class ApplicationInfoProvider { |
There was a problem hiding this comment.
If it's a public class, add some Javadocs. Or maybe move it to impl or make internal otherwise? Does it make sense to make it a public API?
See #4657
org.springframework.boot:spring-boot-web-serverto be able to get effective port number in case of randomly assigned one.