Questions tagged [spring-autoconfiguration]
99 questions
0
votes
1 answer
Refresh beans from external jars
I am using spring-cloud-starter for refreshing the beans when there is a config change. It works as expected for beans that I have control over. If there are certain beans that belong to an external jar and I want them to be refreshed as well when…

Sachin Jain
- 97
- 1
- 10
0
votes
2 answers
Spring @Transactional not working with @NoRepository hierarchy
I have a base interface to contract a query for custom update. This is a library used in other spring applications, and in some enviroments I have a secondary "transactionManager" and also a secondary "entityManager". If this secondary…

Beto Neto
- 3,962
- 7
- 47
- 81
0
votes
0 answers
Understanding why diffierence of bean factory behaviour during autoconfiguration and dependency injection
Considering the following configuration class which declares two beans, bean B which should only be created on conditional of bean A.
@Configuration(
proxyBeanMethods =…

Nanotron
- 554
- 5
- 16
0
votes
1 answer
Should Spring Boot auto-configuration classes use the @Configuration annotation?
Based on my testing, I've found no obvious difference when Spring Boot auto-configuration classes have or don't have the @Configuration annotation - if they are configured in spring.factories correctly they are loaded regardless of the…

Chris Bain
- 746
- 8
- 12
0
votes
1 answer
Springboot custom autoconfiguration in Gradle not loading
So I have I built a custom Springboot starter and autoconfiguration and everything builds fine, the code is all their in the local maven repo.
I even checked the generated jars and everything looksgood.
Can't load the generated files into the…

Owen Rubel
- 9
- 2
0
votes
1 answer
Failed create feign client in spring boot auto configuration
I would like to create a custom autoconfig in external library which is a feign client interface
But when I point the auto configuration by
org.springframework.boot.autoconfigure.EnableAutoConfiguration=
com.hello.world.MyFeginClient
When I build my…

Hong
- 91
- 2
0
votes
0 answers
How do I create load order for for Filters in AutoConfiguration PRIOR to loading into SpringSecurityFilterChain in demo-project?
I am trying to create a load order in the autoconfiguration for the following filters:
@Bean
public FilterRegistrationBean requestParamsFilter(){
FilterRegistrationBean registrationBean = new…

Orubel
- 316
- 4
- 16
0
votes
0 answers
How can I import a inner class in SpringBoot by @Import?
To speed up SpringBoot start up, I try to stop Springboot's auto-config, and import beans by @Import as described in other post. How can I import a inner calss likes AopAutoConfiguration.ClassProxyingConfiguration?
@Import…

klb
- 1
0
votes
2 answers
Possible Missing Annotation with Spring Boot Initializer
I just generated a WAR packaging app with spring boot initializer and here are the generated sources.
Main application class
@SpringBootApplication
public class ChargingListenerApplication {
public static void main(String[] args) {
…

Olgun Kaya
- 2,519
- 4
- 32
- 46
0
votes
1 answer
Spring @Service that depends on Mongo
I want to auto-configure a @Service only if Mongo was configured.
What's the appropriate way to do it?
My thought is to use:
@ConditionalOnBean(MongoTemplate.class)
Is there a better @Conditional method I should use instead?

IsaacLevon
- 2,260
- 4
- 41
- 83
0
votes
0 answers
java.lang.AbstractMethodError: org.springframework.boot.context.config.ConfigFileApplicationListener.supportsSourceType(Ljava/lang/Class;)Z
I have written a spring application.
In the main method I am getting the following error:
Exception in thread "main" java.lang.AbstractMethodError:…

Ishan Tiwary
- 938
- 6
- 15
- 37
0
votes
1 answer
Using Spring Boot auto configuration of MongoDB with Camel, how to know what application.properties
I'm trying to add a Camel rout to a working project with Spring Boot for using MongoDB. I've using Mongo with Spring Boot autoconfigure, and it worked pretty easily.
I was confused about how to specify the bean that Spring Boot generates, but I…

BenW
- 737
- 10
- 41
0
votes
1 answer
Spring Cloud Data Flow - Rest Client - Override RestTemplate
I am using the Spring Cloud Data Flow Task DSL to programmatically launch Spring Cloud Data Flow tasks on Kubernetes.
Looking at the source code for spring-cloud-dataflow-rest-client project, I can see that the DataFlowClientAutoConfiguration class…

Ping
- 587
- 5
- 27
0
votes
0 answers
spring data JPA common @EnableJpaRepositories for multiple projects - shared jar
i'm using spring boot 2.2.5.RELEASE and spring-data-2.2.5.RELEASE
we have multiple projects in different git repositories and I'm trying to create a common JSON repository to work with MySQL JSON functions via shared jar.
i created the following in…

Elia Rohana
- 326
- 3
- 16
0
votes
1 answer
Hazelcast MapStore with Spring Boot Data JPA Circular Dependency
I'm working on a Spring Boot 2.4.1 project using spring-boot-data-jpa and hazelcast. I'm trying to set up a distributed map with a read through to a database. I've implemented com.hazelcast.map.MapLoader, but when I try to run the application it…

CeeTee
- 778
- 1
- 9
- 17