spring-profiles Questions
4
Need to run tests via gradle with spring profiles.
gradle clean build
I've added task:
task beforeTest() {
doLast {
System.setProperty("spring.profiles.active", "DEV")
}
}
test.dependsOn be...
Fecit asked 30/5, 2017 at 8:14
10
Solved
I need to code different logic based on different current Environment profile.
How can you get the currently active and default profiles from Spring?
Wesle asked 13/2, 2012 at 20:50
2
Solved
I have a Spring Boot 2.7.14 application packaged as follows:
com.abc.globalpayments.feeds.downstream.dailycashreport
com.abc.globalpayments.feeds.downstream.dailycashreport.acquire
com.abc.globalpa...
Lobar asked 10/8, 2023 at 14:49
14
Solved
I've generated a Spring Boot web application using Spring Initializer, embedded Tomcat, Thymeleaf template engine.Technologies used:
Spring Boot 1.4.2.RELEASE, Spring 4.3.4.RELEASE, Thymeleaf 2.1.5...
Hunterhunting asked 16/3, 2017 at 17:9
2
Solved
I am studying for the Spring Core certification and I have some doubts related to the use of profiles into JUnit tests.
So I know that if I annote a class in the following way:
@Profile("stub")
@...
Ballesteros asked 30/11, 2014 at 18:1
5
Solved
Until now, I'm setting the following environment variable in my ~/.bash_profile :
export SPRING_PROFILES_ACTIVE=local
This set my active spring profile. But now, I want to add the local profile to...
Connaught asked 16/11, 2016 at 16:41
1
What is exact difference between spring.profiles.active and spring.config.activate.on-profile?
"WARN","msg":"Property 'spring.profiles' imported from location 'class path...
Digiacomo asked 21/7, 2022 at 8:8
6
Wanted to check if Spring boot offers help to use configuration file apart from application.properties file. Ex: my-custom.properties file that can be profile specific,
ex:
my-custom-dev.propertie...
Silver asked 4/2, 2019 at 15:33
0
I have my custom properties defined in application.properties file located in src/main/resources folder. I want to add test cases for my application hence I added application-integration.properties...
Goldina asked 9/2, 2022 at 8:25
4
Solved
I am just wondering what the order of precedence is when multiple Spring active profiles have been specified.
Say I want the default profile to be active but the dev profile to override it when th...
Dudleyduds asked 12/5, 2014 at 20:3
4
I want to set active profile host dependent for any envrionment and cannot find an environment independent hook.
Following factory will set the active profile before application context will build...
Antinomian asked 7/3, 2017 at 10:46
8
Solved
I have an application with maven as a build tool.
I am using maven profiles to set up different properties from different profiles.
What i would like to do is that all active profiles in maven wi...
Theomania asked 21/8, 2014 at 7:37
8
I have a Spring project which uses another project. Each project has its own spring profile initialize from java code using applicationContext.xml and *.properties for each profile. I inject the pr...
Sandalwood asked 22/7, 2016 at 7:29
5
Solved
Now I have a spring-boot app which uses MsSQL server. And we use flyway for migrations.
I want to add an additional profile for tests. I want to generate tables from entity classes instead of usin...
Invest asked 31/5, 2017 at 14:43
4
Solved
As a developer, I use the default dev profile in my local development environment. Here is part of my application-dev.properties file:
# Profiles
spring.profiles.include=auth
Previously I used Sp...
Amanuensis asked 19/11, 2020 at 8:9
4
Solved
I've a Spring Boot application with different Profile setup : dev, prod, qc, console etc.
The two configuration classes are setup as follows. MyConfigurationA should be registered for all profile...
Domoniquedomph asked 7/2, 2016 at 10:24
5
Solved
My intention is to have two profiles in a Spring Boot application - development and production one. Development profile is meant just to override some variables of production profile (like in-memor...
Christopher asked 18/11, 2017 at 16:3
3
Solved
We have different config servers per environment. Each spring boot application should target its corresponding config server. I have tried to achieve this by setting profiles in the bootstrap.prope...
Monstrance asked 5/12, 2016 at 19:30
6
Solved
I have two Spring profiles: dev and test. I want to set the active profile in the server environment, I don't want to set it in my code so that wherever I deploy my application the profile gets loa...
Tool asked 4/4, 2013 at 14:45
2
Solved
I couldn't find a straight answer online.
Do Spring Boot's yml files "inherit" from each other? I mean if I have:
application.yml which has
server:
port: 80
host: foo
and application-profile1...
Head asked 18/1, 2018 at 21:7
2
Solved
I want to launch my spring-boot application after a cf push with a custom profile named my_profile, but the app is always launched with the default one cloud profile. How can I specify the exact pr...
Supper asked 24/6, 2019 at 13:25
2
I am working on a spring-boot application, I need your assistance on below scenario.
I have properties files for each environment something like application-dev.properties, application-prod.proper...
Tabret asked 21/12, 2015 at 10:58
2
I have two Spring profiles dev and test configured for development and test environment. And in each environment I am using different databases viz h2 in dev and postgresql in testing. Following ar...
Fortunia asked 30/12, 2019 at 14:33
6
Solved
How to set active profile in Spring Boot Application. This application will be deployed in standalone Tomcat.
I have 2 property files application-{profile}.properties.
My Application class:
@Spring...
Navel asked 7/7, 2015 at 11:25
2
Solved
I have a requirement of accessing application.properties file outside the project location. I am able to achieve the same using following :
@Component
@PropertySources({
@PropertySource(value = "...
Ila asked 4/7, 2019 at 13:3
1 Next >
© 2022 - 2024 — McMap. All rights reserved.