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
4
votes
2 answers

Spring-boot property value used in another property key

In my spring boot project, I want to use a property value in another property key: server.mode=mock server.protocol.mock=http server.host.mock=my.host-mock.org ... server.protocol.prod=https server.host.prod=my.host-prod.org ... I want to…
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
4 answers

Parse LocalTime using spring expression language from application.properties

I am trying to parse LocalTime from spring's application.properties with following code: @Value("#{ T(java.time.LocalTime).parse('${app.myDateTime}')}") private LocalTime myDateTime; in application.properties I have defined property like…
Denis Stephanov
  • 4,563
  • 24
  • 78
  • 174
4
votes
4 answers

How to split value of property in application.properties

I want to split a value of property defined application.properties and use it as a value for another property. Following are my properties in application.properties…
Sameer
  • 101
  • 1
  • 12
4
votes
4 answers

How do I point spring.freemarker.template-loader-path to the templates within a dependency jar?

I have 2 projects. One project (A) contains all my core functionality such as my entities/services/daos etc. It also contains many .ftl templates I wish to take advantage of and reuse in my other project (B). I have successfully gotten (B) to…
4
votes
0 answers

Can Spring Boot load without default application.properties file in the jar file?

We have a Spring Boot application which we are looking to deploy without an application.properties file in the jar. The application.properties file will be excluded when the jar is built using the maven jar plugin. We want to provide only an…
4
votes
0 answers

Gradle: multiple application.properties for multi-project build with profile support

Basically, I want to have something like the following structure: ├── ... ├── core-module │ ├── build.gradle │ └── src │ ├── main │ | └── java │ | └── resources │ | └── application.properties │ | ├──…
4
votes
2 answers

Spring Boot Multiple Ports?

How can I have a spring boot web application running on multiple ports? for example 8080 and 80 how can I achive this?application.properties server.port=8080, 80
SunflowerToadTheOrbiter
  • 1,285
  • 4
  • 15
  • 25
4
votes
3 answers

Spring boot jar not reading/parsing application.properties root folder

Situation I have a fat .jar of a Spring boot application. I've externalized my configuration with an application.properties file. This file is in the same folder as the .jar, and I'm starting the .jar from the command line from within the same…
Oromë
  • 199
  • 2
  • 16
4
votes
3 answers

Assign a value to a parameter in application properties before use

I have a property in my application.properties file in a SpringBoot project - app.module.service.url=http://localhost:8090/{DOCID} I have injected it into my Java file as below - @Value("${app.module.service.url}") private String url; Now I need…
Rajeev Ranjan
  • 3,588
  • 6
  • 28
  • 52
3
votes
1 answer

what is the difference between below two statements in application.properties file in spring boot

what is the difference between below two statements in application.properties file in spring boot. server.port =8080 and server.port = ${PORT:8080} please help with the explanation
3
votes
1 answer

Using application.properties to set jvm arguments

I'm using spring boot 2.6.2 with docker etc. - my app reads some configuration via application.properties which looks like this: foo.bar=hello run.jvmArguments=-Xmx1G -XX:+ExitOnOutOfMemoryError foo.bar definitely works as expected. But I'm not…
3
votes
1 answer

How to use application.properties values in javax.validation annotations

I have a variable called notification.max-time-to-live in application.yaml file and want to use this as the value of javax.validation.constraints.@Max() annotation. I've tried in many ways (using env.getProperty(), @Value, etc) and it says it must…
3
votes
1 answer

Swagger UI not working behind reverse proxy with prefix path

I'm using Apache reverse proxy for my spring boot application with both the prefix path (set by proxy) and context root in boot application. Hence the url of my application is https:////... Since Swagger…
3
votes
0 answers

Heroku Connection closed without response Java Spring-boot MySQL

I got this error when I try to open my heroku app, I saw that the problem it's because of the timeout so I tried to add server.servlet.session.timeout but it's definitely not the solution. 2020-02-10T11:36:21.190583+00:00 heroku[router]: at=error…
1 2
3
27 28