1
0
mirror of https://github.com/Stirling-Tools/Stirling-PDF.git synced 2024-09-29 08:00:12 +02:00
Stirling-PDF/src/main/java/stirling/software/SPDF/config/AppConfig.java

42 lines
1.4 KiB
Java
Raw Normal View History

package stirling.software.SPDF.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class AppConfig {
@Bean(name = "appName")
public String appName() {
2023-04-02 12:51:07 +02:00
String appName = System.getProperty("APP_HOME_NAME");
if (appName == null)
2023-04-02 12:51:07 +02:00
appName = System.getenv("APP_HOME_NAME");
return (appName != null) ? appName : "Stirling PDF";
}
@Bean(name = "appVersion")
public String appVersion() {
String version = getClass().getPackage().getImplementationVersion();
return (version != null) ? version : "0.3.3";
2023-04-02 12:51:07 +02:00
}
2023-04-02 12:51:07 +02:00
@Bean(name = "homeText")
public String homeText() {
String homeText = System.getProperty("APP_HOME_DESCRIPTION");
if (homeText == null)
homeText = System.getenv("APP_HOME_DESCRIPTION");
2023-04-02 12:51:07 +02:00
return (homeText != null) ? homeText : "null";
}
@Bean(name = "navBarText")
public String navBarText() {
String navBarText = System.getProperty("APP_NAVBAR_NAME");
if (navBarText == null)
navBarText = System.getenv("APP_NAVBAR_NAME");
if (navBarText == null)
navBarText = System.getProperty("APP_HOME_NAME");
if (navBarText == null)
navBarText = System.getenv("APP_HOME_NAME");
return (navBarText != null) ? navBarText : "Stirling PDF";
}
}