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
0
votes
1 answer

Cannot inject property value to class parameter (@Value annotatnion)

I'm learing Spring Boot and I have probably very simple question, but it's not clear enough for me. I'm facing some problem with @Value annotation - I would like to know why apprication property cannot be injected to class parameter. I prepared…
0
votes
2 answers

Spring configure application.properties for placeholder in multitenant environment

I have a multi tenant environment so I need to change some path from application.properties in runtime to use the folder of specific tenant. For example in my application properties: image.avatars=C:/Users/Public/Pictures/Sample…
luca
  • 3,248
  • 10
  • 66
  • 145
0
votes
0 answers

Application properties not reading environment Variables

I have a spring boot application. Currently, for a certain requirement, I am trying to read environment variables in application properties. This is what I have in my application.properties file: notes.userName=${credentials.username} In environment…
0
votes
2 answers

Merge string using references in .properties file in java

My code: public static InputStream input = null; public static Properties prop = new Properties(); static public void getConstants(){ Constants constants = new ConstantsEng(); try { input =…
Rakesh
  • 45
  • 1
  • 9
0
votes
3 answers

Tomcat8 Springboot not reading application.properties

I'm working with java spring for the first time on a personal project and I can't seem to get any of the properties in application.properties to work correctly. I've simplified it down to this test case and it doesn't seem to be doing…
Thomas
  • 871
  • 2
  • 8
  • 21
0
votes
1 answer

Grails 2.4.4 - How to store config variable at war phase and get it in a Tomcat env?

When running "war" command from Grails, I want to store the build commit for use it in a GSP thereafter. In my Config.groovy def proc = 'git rev-parse HEAD'.execute() proc.waitFor() build_commit.number = proc.in.text In my…
el_gars
  • 11
  • 2
0
votes
0 answers

Storing Environment Based Variables in Postgresql

I have multiple kind of environment on which my application runs like Test environment or prod environment.I have different configuration files for each environment named application-prod.properties and application-test.properties and all other…
0
votes
1 answer

"Mark Invalid" error when reading values from application.properties file

I am learning to use Apache Camel with Spring boot. There is an demo I am working on where I am picking up a file from an FTP location and dropping it to a different location. The route works when I am using the ftps uri directly in the from()…
0
votes
1 answer

application properties for hibernate second level caching

I have following properties in my Spring Boot application.properties file…
devcodes
  • 1,038
  • 19
  • 38
0
votes
1 answer

Changing default location of my Spring Boot template throws 404

When I have my index.html at the default location(/resource/templates/index.htm). Everything works fine. But when I Try to change the default location, It simply throws 404. Even after changing the application.properties . Project…
sapy
  • 8,952
  • 7
  • 49
  • 60
0
votes
1 answer

how to set application property variable with system eviroment

I need to set applcation properties variable with system variable Ex. my system variable enviroment on widows is USER_NAME = admin I want that set spring.datasource.username with USER_NAME I tryed to do this mode: in application.properties file …
0
votes
0 answers

Cannot read application.properties file value using context:property-placeholder in spring boot

I am using application.properties file for generic configurations which i intend to do profile based later on. Now i am using another config file root-context.xml where jaxws client bean is configured. i want to pass the endpoint address for that…
0
votes
0 answers

Thymeleaf .properties message

I recieve a stange output when I try to read message from .properties file using Thymeleaf. my html: my .properties file: message=Hello my output: ??message_pl_PL?? I'll appreciate any help.
0
votes
1 answer

Why application.properties is not executing properties after applying spring security in spring boot application?

I have created an spring-boot application. It was working fine all the css and js were mapping perfectly with my jsp pages and application was able to map to my jsp pages as well. By appication.properties file in resources…
0
votes
2 answers

Spring Boot 1.3.8 @Profile and properties

I do use profiles in my Spring Boot application. In my application.properties I have this 3 entries: spring.profiles.active=prod key1=demo. ... key1=prod. ... Currently I have to uncomment the line depending on whether it is a demo or a productive…
quma
  • 5,233
  • 26
  • 80
  • 146