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

409 questions
2
votes
1 answer

Get a hard-coded value using combination of multiple keys

I've to store hard-coded value in my environment files like this: folder.canada.6m.ind=150992762918 folder.canada.9m.group=150992760518 folder.usa.1m.ind=150992762995 There are 3 parameters (String country, String months, String category) which I…
2
votes
0 answers

Spring Test ActiveProfiles is not reading the properties from the test properties file

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 in the src/test/resources folder as mentioned here.…
2
votes
1 answer

spring-boot-maven-plugin build-info.properties

How can I use properties from build-info.properties in application.properties? pom.xml: org.springframework.boot spring-boot-maven-plugin
2
votes
1 answer

Quarkus does not use profile-related variables

These two links: https://quarkus.io/guides/config-reference#custom-profiles and https://quarkus.io/guides/config-reference#profile-aware-files specify how to use different profiles in Quarkus applications. I tried both variants for my testing…
scarface
  • 574
  • 6
  • 20
2
votes
1 answer

Spring Boot application.yml and @Value is not working

My Properties class: @Data @Configuration @ConfigurationProperties(prefix = "application.keys") public class MyProperties { private Duration duration; private String cronValue; } In application.yml file: application: keys: duration:…
2
votes
0 answers

Using application.properties in xml file

I am using spring boot application with appliaction.properties. In the project there is XML file written by another company to configure Stomp, and there is hardcoded IP of the server, but I want to change those IP to take value from…
Jacek Grzelaczyk
  • 783
  • 2
  • 9
  • 21
2
votes
0 answers

Is there a way to validate Spring Boot's profile-specific application properties before deploying?

TL;DR: is there a plugin for maven, Intellij IDEA's Community Edition or even an external tool that could validate Spring Boot's profile specific application-${profile}.yml configuration files (i.e. checking for missing or misspelled properties)? We…
Tarek
  • 3,080
  • 5
  • 38
  • 54
2
votes
1 answer

Springboot - application-integration.properties working under src/main/resources, but not under src/test/resources

Small question regarding a Spring profile (integration) applied to Springboot please. Currently, under src/main/resources, I have several application.properties files. Such as: application…
PatPanda
  • 3,644
  • 9
  • 58
  • 154
2
votes
0 answers

How to map property in application.yml to JsonNode? (Spring)

In a @ConfigurationProperties bean, I could map the customers property of the application.yml file below to List, but I would like to instead map it to a Jackson JsonNode. Is this possible? If so, how? shop: name: "Sam's Bikes" …
user6429576
2
votes
1 answer

How can I initialize a companion object property with a value taken from application.properties?

Is it possible to initialize a property of a companion object with some value read from application.properties? I tried // @Value("\${my.property.value}") ...doesn't work val myProp: Duration by lazy {…
2
votes
0 answers

Hibernate table name from application.properties in Spring Boot

I need to store Hibernate table name in Spring Boot application.properties file, so I can change it without code change. My code looks like : @Data @Entity @Table(name = "myTable") public class MySpecificTable{ @Id …
Bohdan Myslyvchuk
  • 1,657
  • 3
  • 24
  • 39
2
votes
2 answers

Error authenticating MongoCredential when trying to connect from spring boot docker container to mongo docker container?

I have the following docker compose file, for a Spring boot container that connects to a mongoDB container: # # APIs #---------------------------------------------- pokerstats: image: pokerstats container_name: pokerstats ports: …
2
votes
1 answer

Spring Boot connect to remote ip

I need to connect to remote ip database, the ip has itself a port number associated with it. My database port is 1433. I am using the following connection string in my…
Jerin
  • 35
  • 1
  • 7
2
votes
2 answers

using application.properties values to create a SFTP connection

my application.properties file look like this: sftp.host=0.0.0.0 sftp.port=22 sftp.user=foo sftp.password=pass and my upload class with upload method looks like this: public class UpAndDownLoad { @Value("${sftp.host}") private String…
robinhoodjr
  • 415
  • 8
  • 20
2
votes
1 answer

Inject place holder values at Spring boot application.yml file using intellij at run time

I am using Intellj to run my Spring Boot application which has application.yml file with place holder. The values of placeholder should be injected at run time depending upon the environment configuration. server: port: ${SERVER_PORT} I am trying…