The configuration seem alright, except that you should use excludeFilters
instead of excludes
:
@Configuration @EnableSpringConfigured
@ComponentScan(basePackages = {"com.example"}, excludeFilters={
@ComponentScan.Filter(type=FilterType.ASSIGNABLE_TYPE, value=Foo.class)})
public class MySpringConfiguration {}
More Related Contents:
- Is spring default scope singleton or not?
- How to get bean using application context in spring boot
- Spring Boot Configure and Use Two DataSources
- Filter invoke twice when register as Spring bean
- Spring Boot, Spring Data JPA with multiple DataSources
- How can I log SQL statements in Spring Boot?
- Difference between @Mock, @MockBean and Mockito.mock()
- Spring Boot Adding Http Request Interceptors
- POSTing a @OneToMany sub-resource association in Spring Data REST
- Spring boot @ResponseBody doesn’t serialize entity id
- Filter order in spring-boot
- No serializer found for class org.hibernate.proxy.pojo.bytebuddy.ByteBuddyInterceptor
- How to disable ‘X-Frame-Options’ response header in Spring Security?
- Spring – Injecting a dependency into a ServletContextListener
- Difference between @Bean and @Autowired
- Spring-Boot: How do I set JDBC pool properties like maximum number of connections?
- Explain why constructor inject is better than other options [duplicate]
- Spring Boot: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean
- While using Spring Data Rest after migrating an app to Spring Boot, I have observed that entity properties with @Id are no longer marshalled to JSON
- How to reinitialize a Spring Bean?
- Websocket Authentication and Authorization in Spring
- java.lang.IllegalArgumentException: No converter found for return value of type
- Configuration using annotation @SpringBootApplication
- Autowiring in Spring bean (@Component) created with new keyword
- How to re-create database before each test in Spring?
- Spring JUnit: How to Mock autowired component in autowired component
- How do you configure Embedded MongDB for integration testing in a Spring Boot application?
- Programmatically restart Spring Boot application / Refresh Spring Context
- What does Cookie CsrfTokenRepository.withHttpOnlyFalse () do and when to use it?
- Externalize query in spring boot application