Questions tagged [spring-profiles]

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

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

http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-profiles.html

349 questions
0
votes
1 answer

Spring boot environment variable are not reflecting properly

I am working on spring boot application where I want to completely externalize my environment variables dynamically by config server. So below is the code I have written. Application.java package com.util; import org.slf4j.Logger; import…
Shankar
  • 143
  • 2
  • 10
0
votes
3 answers

How do i run a executable springboot jar by setting a profile?

I am trying to set the profile as dev,but the spring boot app does not start in dev profile.No active profile set, falling back to default profiles: default. i am running with the command :java -jar myapp.jar -Dspring.profiles.active=dev
0
votes
1 answer

Should Spring Profiles be used as direct replacement for environments in environment bound applications?

I have been reading Spring Boot documentation for some time. What I have understood about Spring Profiles is that they are used to segregate parts of your application configuration and make it only available in certain environments Now, our…
0
votes
1 answer

Multidimensional Spring Profiles for prod/test vs gui

I am new to Spring and I never used profiles. I want to develop an application and set up different logic for different environments. I need a production environment and a test environment, for both I should be able to define if the GUI is active or…
prre72
  • 697
  • 2
  • 12
  • 23
0
votes
1 answer

SpringBoot: FileNotFoundException when using PropertySoucre with external file and using java jar command

The service will be started from eclipse, but the same thing doesn't doesn't work if I start using the jar command. It only works if I give absolute path in the property source. I want the property source to work with relative path. Below are the…
shoaib1992
  • 410
  • 1
  • 8
  • 26
0
votes
2 answers

How to correctly using Spring profile on windows

I am trying to maintain different Spring profiles for development and production, for which I have created a folder(web skeleton) on my desktop with my Spring Boot project, application-dev.properties and application-prod.properties. However, I am…
Sagar Nair
  • 107
  • 1
  • 9
0
votes
1 answer

Spring Profiling

I have 2 URLs among which 1 is specific to Dev and the other to Prod. I am also using Spring profiling where i have seperate file for dev and prod application-dev.properties and application-prod.properties and my appication.properties file look…
Sunny
  • 858
  • 3
  • 17
  • 39
0
votes
0 answers

How to reload all spring beans?

I have a Spring application, some beans are for demo purpose, other for production and I choose one or other with @Profile annotation. I add "demo" or "production" profile setting based on a database value. I would like to reload all beans runtime…
Tobia
  • 9,165
  • 28
  • 114
  • 219
0
votes
2 answers

what does this @Profile("!json") mean

We are using this and would like to know what it actually does, looked on the web for detailed explanation but didn;t find anything for exclamation,profile,spring
Julie
  • 179
  • 2
  • 13
0
votes
0 answers

Spring profile not working in logback configuration

I configured logback, but it always uses my local profile, even when I set -Dspring.profiles.active=dev. Has anyone solved this issue? Here is a code snippet:
0
votes
1 answer

How to make proper Spring boot testing with embedded db mocking, AWS, with profiles, in the newest Spring version?

I have a Spring Boot Application which runs in AWS environment. Database is Postgres, all the environmental variables are outsourced, so I have an application.yml with different profiles and they read env variables like: spring: datasource: …
0
votes
0 answers

how to pass property value to PropertyPlaceholderConfigurer bean in applicationContext.xml

i want to pass environment name dynamically to PropertyPlaceholderConfigurer bean, it is not reading from properties file & default-application.properties is in classpath
Surya Movva
  • 151
  • 13
0
votes
1 answer

How to set Default Profile Spring

Here's my scenario: a.xml ----- b.xml ----- c.xml -----