2023-03-20 22:55:11 +01:00
|
|
|
package stirling.software.SPDF.config;
|
|
|
|
|
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
|
|
|
|
|
|
|
|
@Configuration
|
|
|
|
public class AppConfig {
|
|
|
|
@Bean(name = "appVersion")
|
|
|
|
public String appVersion() {
|
|
|
|
String version = getClass().getPackage().getImplementationVersion();
|
|
|
|
return (version != null) ? version : "0.3.3";
|
|
|
|
}
|
2023-04-01 22:02:54 +02:00
|
|
|
|
|
|
|
@Bean(name = "appName")
|
|
|
|
public String appName() {
|
|
|
|
String appName = System.getProperty("AppName");
|
|
|
|
if(appName == null)
|
|
|
|
appName = System.getenv("APP_NAME");
|
|
|
|
return (appName != null) ? appName : "Stirling PDF";
|
|
|
|
}
|
2023-03-20 22:55:11 +01:00
|
|
|
}
|