Questions tagged [spring-boot-configuration]
100 questions
0
votes
1 answer
spring set Profile from external properties file
I am setting my database properties from an external file and am trying to do the same for the active profile, but am not having any luck.
In app.properties if tried: spring.config.location= C:\\run\\secrets\\test but that did not work.
In the same…

reactFullStackDeveloper
- 829
- 2
- 15
- 32
0
votes
0 answers
Configuration properties for dependency module in Spring Boot multi module gradle project
I've been searching around and scratching my head for a few hours now, and I can't get it working.
I have a multi-module project with Gradle, currently with two modules: the BFF (using Spring Boot), and a module fetching some data from a database…

Steen
- 311
- 1
- 3
- 11
0
votes
2 answers
Springboot Intellij yaml configuration autocomplete with lists
I'm unable to get lists to autocomplete when writing configuration files. Standard objects work as expected.
I've configured both classes as properties:
@SpringBootApplication
@EnableConfigurationProperties(value = {AppProperties.class,…

Chris
- 3,437
- 6
- 40
- 73
0
votes
1 answer
Spring-boot - Docker Compose - Service ready
I have a docker-compose with 3 services: config-server, cpo-events and cpo-executor. I want that the services start only when config-server is ready because the services need the config files that are in config-server…

Aldo Inácio da Silva
- 824
- 2
- 14
- 38
0
votes
3 answers
404 spring controller error if JSON string contains number greater than 10 digits
I'm having a controller which gets json as string in request body as below
@PostMapping("/addUser")
public ResponseEntity> addUser (@RequestBody String userJson,HttpServletRequest request) {
log.info("inside add user controller")
String…

vishal sundararajan
- 117
- 2
- 15
0
votes
1 answer
XmlHttpRequest No 'Access-Control-Allow-Origin' header is present on the requested resource - Chrome browser
I have created a java service to return a json object. It is working fine in postman but when i try it using the chrome browser i am getting below error
CORS policy issue
the code:
var xhttp = new XMLHttpRequest();
var url =…

sanjay m
- 63
- 1
- 16
0
votes
1 answer
Cant find the reason that reverts the behavior of spring.config.location to older Springboot versions
We have a deployment env which use to/uses -spring.config.location=app.properties property to provide the config location. Like mentioned in this post & this one github-br I wasn't aware that for my current springboot version i.e. 2.2.5.RELEASE the…

humbleCoder
- 667
- 14
- 27
0
votes
0 answers
Spring Security configuration with the login form
It showing me the defult Login form and my login form i use the defult User name und passowrd to login to time. in the first time it sowing me my login form and when i try to login in the same default username and password it rturn alwas to the…
0
votes
2 answers
Spring boot batch job identification
I have tried to find the answer for seemingly simple but the evasive question. How does spring identify jobs in the batch configuration. Everything is annotated with @Bean and nothing to identify. Does the spring identify those with keywords in the…

Yakup Türkan
- 576
- 2
- 6
- 21
0
votes
1 answer
Spring boot Load configuration per environment using PropertySource
I'm trying to add authorization to several microservices. Given all the services share similar authorization process, I want to extract the logic to a shared library.
I managed to create library, but I realise all the configurations need to be set…

xialin
- 7,686
- 9
- 35
- 66
0
votes
1 answer
Can I generate the spring boot configuration metadata as a .properties file
If I include spring-boot-configuration-processor as a dependency, my build will produce a json file like this:
{
"groups": [
{
"name": "attachments",
"type": "com.example.config.AttachmentsSettings",
"sourceType":…

whistling_marmot
- 3,561
- 3
- 25
- 39
0
votes
2 answers
How to conditionally autowire a configuration class within service
Currently, I have a service class within which I am trying to constructor auto wire Configuration class. However, I would expect my service class to be generic and work for any Configuration class with similar properties.
Is there a way I can…

shettyvinayg
- 5
- 4
0
votes
1 answer
Spring boot config client properties
//This is the value of the property which needs to be fetched via config server from git repo
ConfigClientController(@Value("**${foo:test}"**) String value) {
this.value = value;
}
The above code is a spring cloud config…

sachin bhat
- 27
- 7
0
votes
2 answers
How to disable SpringBoot autoconfiguration for TomcatServletWebServerFactory in order for a custom spring-starter to provide it?
so I was writing my own SpringBootStarter which was supposed to enable the JNDI lookup in the embedded tomcat of a SpringBoot application.
My sample SpringBoot application has a dependency of my custom SpringBootStarter, which in turn has a…

uhmdunnolol
- 59
- 8
0
votes
1 answer
Shared Config Between SOME Spring Boot Services
This question is similar to (but different in the aim): Shared Config(at git) between SPring Boot Services so I will make use of the example the OP wrote there.
In my case I am using Spring Cloud Config Server with the Vault as backend, but for the…

fditz
- 871
- 9
- 28