Questions tagged [spring-config]

Refers to the org.springframework.context.annotation package of the Spring Framework that moves bean definition and Spring configuration out of XML file and into Java classes via annotations.

Questions referring to @Configuration and @Bean will be the primary source of questions for this tag.

Useful Links

178 questions
0
votes
0 answers

Directory for Spring boot additional location parameter

I am trying override few of the properties in my spring boot application. The properties are spread across mutiple yml files within the same directory and hence i would like to specify spring.config.additional-location parameter with the value of…
0
votes
1 answer

How to fetch properties from config-server consisting of more than one repo

I wanted to fetch properties from two git repos. one is https://username@bitbucket.my.domain.com/share.git - which will have a property file contains some common key value pair and the other one is…
Sayan
  • 15
  • 8
0
votes
0 answers

How to fix 'Can not build schema' error in Spring3.2?

I’m trying to run Spring3.2 application with job scheduler and getting the below error message: May 06, 2019 2:03:20 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener…
Manoj
  • 39
  • 1
  • 6
0
votes
2 answers

How to combine two different configuration files in Spring boot?

I have multiproject Spring application. Project A - responsible for LDAP authentication Project B - responsible for Database authentication Project MAIN - can use both of them or one of them. If we use only Project A - we have LDAP auth If we use…
art
  • 95
  • 1
  • 12
0
votes
1 answer

Spring configuration binding failes

I have following block in application.yaml file: foo: bar: bazz I want to map that configuration to a configuration class using @ConfigurationProperties. @Validated @Getter @Setter @ConfigurationProperties(prefix = "foo") public class…
user3018350
0
votes
2 answers

How do we fix the spring configuration check popups that come while importing projects?

I am trying to clone a Java project and start working on it using IntelliJ. When I open the project in IDE, it gives me a pop up saying unmapped Spring configuration files are found. Please configure Spring facet or use 'Create Default Context' to…
Spear A1
  • 525
  • 1
  • 7
  • 20
0
votes
1 answer

Spring Config uri

I have configured bootstrap.yml for spring config spring: application: name: cce-auth cloud: config: uri: http://temp.com:8888 It works fine but I need URI value Dynamically, for example if I will publish this .war in test…
ZURA Tikaradze
  • 279
  • 5
  • 15
0
votes
3 answers

junit | autowired components in main is null

I have a class defined in src/main/java: Class A{ @Autowired B b; public void method1() {} } The corresponding test class is: Class ATest { A a; @Test public void method1Test() {} } B is null when ATest is unit…
Guru
  • 2,739
  • 1
  • 25
  • 27
0
votes
2 answers

Spring Boot Configuration class cannot wire ConfigurationProperties at runtime

Java 8 and Spring Boot 1.5.8 here. I have the following application.properties file: logging: config: 'logback.groovy' myapp: hystrixTimeoutMillis: 500 jwt: expiry: 86400000 secret: 12345 machineId: 12345 spring: cache: type:…
hotmeatballsoup
  • 385
  • 6
  • 58
  • 136
0
votes
2 answers

Spring won't load config on client app (Spring Cloud Config Server)

My config service does work fine. Here is the application.properties server.port=8888 spring.cloud.config.server.git.uri=…
CCC
  • 2,642
  • 7
  • 40
  • 62
0
votes
3 answers

Spring Boot LDAP - pooled property for auto configuration

In Spring Boot I can pass properties which will be picked for auto configuration: spring.ldap.url spring.ldap.username spring.ldap.password Is there any spring.ldap.* property to set pooled=true to avoid using explicit LdapTemplate…
Justinas Jakavonis
  • 8,220
  • 10
  • 69
  • 114
0
votes
2 answers

Spring config server with JDBC is throwing Invalid config server configuration error

I want to use JDBC mysql with Spring cloud config server, but always failed, this is what I am doing: Spring cloud version: Finchley.SR2 In POM.xml org.springframework.cloud
user3006967
  • 3,291
  • 10
  • 47
  • 72
0
votes
1 answer

why is my spring-cloud-stream test configuration also starting up rabbitMQ listeners in another class?

I'm trying to do a simple spring-cloud-stream unit test to verify the wiring between streams; basically that a handler can read from one stream and write to another. This part is working fine. The problem is that other parts of the app are being…
0
votes
1 answer

Can I get another @Configuration only through @ComponentScan

I am using spring-boot 2.0.4; I have a bunch of services and they have a common configuration class marked with @Configuration. I want to move this to a common dependency which will have this @Configuration, and based on the need, any…
Nitin1706
  • 621
  • 1
  • 11
  • 21
0
votes
1 answer

If statement in xml Spring bean definition

I have xml definitions of beans like this
liotur
  • 809
  • 2
  • 17
  • 36