You may try.
@Profile("production")
@Component
public class ProductionPropertySetter {
@PostConstruct
public void setProperty() {
System.setProperty("http.maxConnections", "15");
}
}
More Related Contents:
- Spring Boot Multiple Datasource
- After Spring Boot 2.0 migration: jdbcUrl is required with driverClassName
- Spring Boot 2.0.x disable security for certain profile
- How do I configure HikariCP in my Spring Boot app in my application.properties files?
- Consider defining a bean of type ‘package’ in your configuration [Spring-Boot]
- SpringBoot – making jar files – No auto configuration classes found in META-INF/spring.factories
- Setting active profile and config location from command line in spring boot
- More than one fragment with the name [spring_web] was found. This is not legal with relative ordering
- Spring Boot default H2 jdbc connection (and H2 console)
- Configure active profile in SpringBoot via Maven
- Spring AOP not working, when the method is called internally within a bean
- Maven resource filtering not working – because of spring boot dependency [duplicate]
- Maven spring boot run debug with arguments
- Maven profiles equivalent of Gradle
- Customizing Zuul Exception
- Configure DataSource programmatically in Spring Boot
- How to test Externalized Configuration reading from yaml
- What is the default scheduler pool size in spring-boot?
- Cannot open Swagger UI in its Version 3 in my Spring Boot Example
- Difference between Interceptor and Filter in Spring MVC
- Spring Boot, logback and logging.config property
- What’s the difference between a System property and environment variable
- @TestPropertySource doesn’t work for JUnit test with AnnotationConfigContextLoader in Spring 1.2.6
- Spring Data JPA without Spring Boot
- Adding Dynamic Number of Listeners(Spring JMS)
- Missing CrudRepository#findOne method
- Why has javax.persistence-api been replaced by jakarta.persistence-api in spring data jpa starter?
- How to modify request body before reaching controller in spring boot
- Spring Boot – Reading Text File using ResourceLoader
- Enabling CORS globally in Spring Boot