Questions tagged [spring-autoconfiguration]

99 questions
1
vote
1 answer

Issue connecting Springboot 2.7.8 with AWS Elasticsearch : ElasticsearchException[Invalid or missing build flavor [oss]]

I've upgraded my Springboot version to 2.7.8, spring-data-elasticsearch version to 4.4.7 and org.elasticsearch --- elasticsearch to 7.17.3 Here are the dependencies in my pom.xml org.springframework.boot
1
vote
2 answers

Spring Boot disable R2dbcAutoConfiguration

I'm trying to create a ConnectionFactory bean and so I want to disable the R2dbcAutoConfiguration. I tried the following so far: @SpringBootApplication(exclude = R2dbcAutoConfiguration.class) and @EnableAutoConfiguration(exclude =…
1
vote
0 answers

Skip environment post processor for spring starter

I am currently using spring boot with some 3rd parties starter. I want to disable those AutoConfiguration and the EnvironmentPostProcessor in the starter during testing I can disable AutoConfiguration by using @EnableAutoConfiguration(exclude…
HKIT
  • 628
  • 1
  • 8
  • 19
1
vote
1 answer

Spring Batch: How to specify a single header and footer line for ClassifierCompositeItemWriter writing into 1 file

StepConfig.java package electronicdocumentdeliverybatch.config; import electronicdocumentdeliverybatch.models.*; import electronicdocumentdeliverybatch.models.properties.TestFileProperties; import…
1
vote
1 answer

Disable Spring Boot Configuration

How to disable Spring Boot auto configuration.I want to disable the data source auto configuration.
1
vote
1 answer

How to disable auto configuration when test profile in @SpringBootApplication?

Are there elegant ways to prevent AutoConfigure configuration classes when certain profile (e.g. test) in use? I've all configs in my tests, and don't wanna mark every config in main folder with @Profile("!test") there also is:…
J.J. Beam
  • 2,612
  • 2
  • 26
  • 55
1
vote
1 answer

Could not instantiate custom library's DataSource after Spring Boot upgrade

I have custom datasource defined in a library with autoconfiguration: @Configuration @ConditionalOnProperty( name = ["spring.datasource.type"], havingValue = "org.example.datasource.connector.RoutingDataSource", …
1
vote
0 answers

To use Autowired without spring boot

I am trying to use Spring Autowired and Configs without using springboot. I have the below dependencies and the class look like below (I got a service, component and config class). But I get SomeService as null always. What am I…
Minisha
  • 2,117
  • 2
  • 25
  • 56
1
vote
3 answers

Quartz + Spring Boot: Concurrent execution of multiple jobs

I have simple Spring Boot (2.5) application to get multiple data from multiple sources at once. I have created 3 job classes, each of them have several tasks to do. First one have two tasks (defined in separate methods) to do, second have 3 and…
1
vote
1 answer

How to use ElasticsearchRestClientAutoConfiguration with spring-boot?

i want ElasticSearch with autoconfiguration, set application.yml like below: spring: elasticsearch: rest: uris: - http://localhost:9200 spring boot version : 2.4.3 and using io.spring.dependency-management. maybe…
JYL
  • 193
  • 2
  • 16
1
vote
0 answers

Spring boot @AutoConfigureBefore not working

I have a dependency on my custom Redis starter that has a configuration class, Which I want to start before RedissonAutoConfiguration, for that, I use @AutoConfigureBefore annotation, though, it seems not to work and still, RedissonAutoConfiguration…
1
vote
1 answer

Understanding sourcing secrets in kubernetes spring boot app

I am following this guide to consume secrets: https://docs.spring.io/spring-cloud-kubernetes/docs/current/reference/html/index.html#secrets-propertysource. It says roughly. save secrets reference secrets in deployment.yml file containers: -…
Funzo
  • 1,190
  • 2
  • 14
  • 25
1
vote
2 answers

Override default application properties by spring.profiles.active

I'm having problems overriding the default application properties by specifying the active profile by spring.profiles.active property. I have developed a sample project to replicate this issue. I have 2 application.yml…
1
vote
0 answers

After uplift from Spring Boot 2.1.7 to 2.2.0 application does not start due to a FailureAnalyzer

I am working on a Spring Boot based project and so far I was using 2.1.7. As I started with HateOas part, I decided to sit on newer HATEOAS 1.0 and so I uplifted my application so Spring Boot 2.2.0. The only changes I did on my application…
WinterBoot
  • 399
  • 1
  • 5
  • 15
1
vote
1 answer

spring.jackson.default-property-inclusion ignored

In my Spring Boot/Kotlin project, I am trying to get the JSON converter to ignore null values in my rest controller responses. I've tried setting the following in my application.yml: spring: jackson: default-property-inclusion:…
MorganP
  • 183
  • 3
  • 11