Une collection organisée de snippets de code pour accélérer votre développement. Parcourez, recherchez et copiez en un clic.
@SpringBootApplication
@EnableConfigurationProperties(AppProperties.class)
public class MonApplication {}
# application.properties
spring.profiles.active=prod
@Value("${app.name}")
private String appName;
@ConfigurationProperties(prefix = "app")
public class AppProperties {
private String name;
// Getters and Setters
}
# application-prod.properties
# application-dev.properties