Questions tagged [application.properties]

application.properties is the configuration file to configure dynamic properties for the application. It holds configuration properties in the form of key-value pair

application.properties is the configuration file to configure dynamic properties for the application. It holds configuration properties in the form of key-value pair

287 questions
84
votes
4 answers

Intellij IDEA complains cannot resolve spring boot properties but they work fine

Can not resolve configuration property '... I have no problem accessing my properties through the @Value annotation or through an autowired Evironment. But all of my own defined properties get this warning in IDEA. What should I be doing to get…
Stoopkid
  • 1,466
  • 1
  • 14
  • 24
23
votes
2 answers

Precedence order among properties file, YAML file, and Command Line arguments in SpringBoot

I have been using application.properties files since long in my Spring application. But recently I came across application.yaml files. What is the precedence order among all three and advantage (if there is one) of using individual. I know this…
17
votes
5 answers

Spring Boot: @Value returns always null

I would like to use a value from application.properties file in order to pass it in the method in another class. The problem is that the value returns always NULL. What could be the problem? Thanks in…
Jonathan Williams
  • 207
  • 1
  • 2
  • 12
14
votes
2 answers

Quarkus how to set environment variables in application.properties

recently I swapped from thorntail to quarkus and I'm facing some difficulties trying to find how to set environment variables in application.properties in thorntail I used something like this ${env.HOST: localhost} that basically means put…
11
votes
1 answer

Spring-boot application-test.properties

I am trying to unit test the spring-boot application using junit. I have placed the application-test.properties under src/test/resources. I have a ApplicationConfiguration Class which reads the application.properties. My test class looks like…
10
votes
2 answers

Spring-Boot multi module unable to read properties file from another module

I have searched High and low and still I am unable to find a simple answer to this very annoying problem, I have followed this great guide: JWT with multi service app Everything works great but in the end of the guide we are suggested to create a…
8
votes
1 answer

Spring Boot Flyway migration placeholder

Can someone show the right format to use to use application.properties config in Flyway migrations. I'd like to use the username for the datasource config in my application.properties file to grant permissions on a database table (db migration using…
user1016765
  • 2,555
  • 1
  • 24
  • 34
7
votes
1 answer

Heroku Spring application.properties file

I am hosting my Spring boot application on Heroku using git deploy. I have a public git repository and have added my application.properties file to the .gitignore as it contains sensitive details such as an api key and database credentials. What is…
user3371750
7
votes
2 answers

Spring Boot Unable to determine jdbc url from datasource

I'm building an application using spring boot and need to connect to Oracle DB via service, not sid. These are datasource…
Yakiv
  • 453
  • 2
  • 5
  • 17
6
votes
2 answers

Spring Boot connection to Postgresql with SSL

I have a Spring Boot application (version 2.1.1) using Postgresql 9.6 as database. I have to connect to the db via SSL with sslmode=verify-ca. What I have done till now is to set in the Application.properties file the…
6
votes
1 answer

How to use multiple mongodb databases in spring boot application?

In my application, I need to use two MongoDB databases. I don't know how to add 2 MongoDB databases in the application.properties file in the spring application. Here is the application.properties file of my project,…
5
votes
2 answers

Convert YAML file to Application.properties

How can we convert YAML file to Application.properties? pay.payment: sandbox: Url: https://securegw-stage//processTransaction callbackUrl: http://localhost:8080/pgresponse details: CHANNEL_ID: '${pay.payment.sandbox.channelid}' …
Myjay1516
  • 157
  • 1
  • 2
  • 12
5
votes
2 answers

Could not resolve placeholder 'spring.profiles.active' in value "classpath:/ldap-${spring.profiles.active}.properties"

I am trying read ldap properties from a ldap-TEST.properties file and trying to bind it to a java config class.for that i had specified @PropertSource and defined a static Bean for propertysourcesplaceholderconfigurer. still i am getting the Could…
user2307155
  • 155
  • 1
  • 2
  • 12
4
votes
1 answer

Access vault secret using spring-cloud-vault and use it in application.properties

I have a vault server hosted in Openshift and I have to access secrets from the Vault into my spring application. My bootstrap.yml looks like this : spring: application: name: application-name profiles: dev cloud: vault: …
4
votes
2 answers

spring.session.timeout vs server.servlet.session.timeout

I'm looking to extend the user session in a Spring MVC app with Spring boot and Tomcat. Looking at the documentation there seems to be 2 relevant properties: server.servlet.session.timeout spring.session.timeout Most examples out there seem to…
d0001
  • 1,912
  • 2
  • 16
  • 44
1
2 3
19 20