Questions tagged [spring-autoconfiguration]
99 questions
0
votes
1 answer
Correct Use of Spring Boot Hazelcast Auto-Configuration with @SpringAware MapLoader
I have a project using Spring Boot 2.4.1 and Hazelcast 4.1.1. I am trying to use Spring Boot autoconfiguration to setup a distributed map with a read through using a JpaRepository to populate the map. I've added application.yaml and hazelcast.yaml…

CeeTee
- 778
- 1
- 9
- 17
0
votes
0 answers
ConditionalOnMissingBean in combination of EnableJpaRepositories
i've use the following configuration:
@Profile("database")
@Configuration
@EnableJpaRepositories(basePackages = "com.example.repository")
public class RepositoryConfig {
}
public interface MyRepositoryInterface extends…

INJG
- 71
- 7
0
votes
1 answer
Spring Boot default auto-configuration based on property
I want to apply the default spring security auto-configuration based on a property from application.yml. I thought I first exclude the auto-configuration class and then add it as an import to my configuration class that is conditional on that…

John Allison
- 966
- 1
- 10
- 30
0
votes
1 answer
@AutoConfigureMockMvc how to set message converters
How can I specify message converters when using @AutoConfigureMockMvc?
Consider following example:
@SpringBootTest(classes = SomeController.class)
@AutoConfigureMockMvc
@WithMockUser
class SomeControllerTestIT {
@Autowired
private MockMvc…

tillias
- 1,035
- 2
- 12
- 30
0
votes
1 answer
Spring Boot - @Value returning null in the @Component class
This is a simple class where im trying to map a error message with @value.
i did not add the corresponding value in property file as i have set default value
@Slf4j
@Component
public class RestTemplateResponseErrorHandler
implements…

dheeraj
- 195
- 2
- 19
0
votes
0 answers
Springboot autoconfiguration @ConditionalOnClass TypeNotPresentExceptionProxy
Trying to learn Springboot Autoconfiguration.
I created the folowing module with an autoconfiguration class, the idea as indicated is that the bean migrationAutoConfigBeanCreated will be created if the caller app have Flyway library in the…

medkhelifi
- 1,071
- 3
- 17
- 35
0
votes
2 answers
NoSuchBeanDefinitionException: No bean named 'elasticsearchTemplate' available when I use Autoconfiguration
I want use ElasticSearch and Spring Data. I added this dependencies:
org.springframework.boot
spring-boot-starter-data-elasticsearch
…

All_Safe
- 1,339
- 2
- 23
- 43
0
votes
1 answer
BeanPostProcessor can't process bean RedisProperties
The verion of spring boot which I use is 2.1.5.RELEASE.
My project work with redis.For security,I encrypt my redis password.I set value in my application.properties as follows:
spring.redis.password=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I want…

孙祥钰
- 11
- 2
0
votes
1 answer
AutoConfigure RestController Spring Boot
I have tried to find documentation on how to manually configure a RestController (i.e in a Configuation class). That means without using the RestController annotation. Considering all the other annotations, like mapping, pathvariables etc. is at all…

thomas77
- 1,100
- 13
- 27