Top "Spring-profiles" questions

Spring Profiles provide a way to segregate parts of an application configuration and make it only available in certain environments.

Spring Boot Programmatically setting profiles

How to set active profile in spring boot Application. This application will be deployed in stand alone Tomcat. I have 2 …

spring-boot tomcat8 spring-profiles
Clarification about @EnableMongoRepositories

I'm trying to use @EnableMongoRepositories for using two separate mongo repositories like: @Configuration @EnableMongoRepositories(mongoTemplateRef = "mongoBOTemplate", basePackages = "sandbox.dao.bo") …

spring spring-data maven-profiles spring-profiles
Spring: Selecting @Service based on profile

I have an interface define as below: public interface MyService { } And two classes implementing it: @Service @Profile("dev") public class …

java spring autowired spring-profiles
Spring MVC @Controller and profiles

I have a spring mvc controller and I want to enable it only in some profiles (for example development and …

java spring spring-mvc spring-profiles
spring.profiles.active not honoured

In application.properties we have the line spring.profiles.active=LOCALHOST In application-DEV.properties , we have the line spring.profiles.…

java spring spring-boot spring-profiles spring-properties
spring boot not loading default profile while using spring.profile.default in application.properties

FYI : I swear there is no activating profile configuration such as -D or run configuration Goal When application is booted …

java spring-boot spring-profiles
Run gradle task with Spring Profiles (Integration tests)

Need to run tests via gradle with spring profiles. gradle clean build I've added task: task beforeTest() { doLast { System.setProperty("…

java spring gradle profiling spring-profiles
Not loading a Spring bean when a certain profile is set

Background: So, I've got several beans that interface external systems. For development, it's convenient to mock the external systems and …

java spring spring-bean spring-profiles
Spring not overriding active profile from command line

Here is my application.yml file: spring: freemarker: template-loader-path: classpath:/templates datasource: url: jdbc:postgresql://localhost:5432/myapp username: postgres password: …

java spring spring-boot spring-profiles
Modify active profiles and refresh ApplicationContext runtime in a Spring Boot application

I have a Spring boot Web application. The application is configured via java classes using the @Configurable annotation. I have …

java spring-boot refresh applicationcontext spring-profiles