Another simple way to exclude the auto configuration classes,
Add below similar configuration to your application.yml file,
---
spring:
profiles: test
autoconfigure.exclude: org.springframework.boot.autoconfigure.session.SessionAutoConfiguration
More Related Contents:
- Difference between @Mock, @MockBean and Mockito.mock()
- @TestPropertySource doesn’t work for JUnit test with AnnotationConfigContextLoader in Spring 1.2.6
- Spring Boot and multiple external configuration files
- Add context path to Spring Boot application
- Spring Boot – inject map from application.yml
- Spring Boot – Handle to Hibernate SessionFactory
- Java Spring Boot: How to map my app root (“/”) to index.html?
- Read file from resources folder in Spring Boot
- Filter order in spring-boot
- No serializer found for class org.hibernate.proxy.pojo.bytebuddy.ByteBuddyInterceptor
- Mapping list in Yaml to list of objects in Spring Boot
- Spring Boot: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean
- Websocket Authentication and Authorization in Spring
- Hot swapping in Spring Boot
- SpringRunner vs SpringBootTest
- java.lang.IllegalArgumentException: No converter found for return value of type
- Spring: overriding one application.property from command line
- Configuration using annotation @SpringBootApplication
- Spring-boot: required a bean named ‘entityManagerFactory’ that could not be found
- How set up Spring Boot to run HTTPS / HTTP ports
- What is username and password when starting Spring Boot with Tomcat?
- Spring Boot – Limit on number of connections created
- Spring-Boot How to properly inject javax.validation.Validator
- Spring Security HTTP Basic for RESTFul and FormLogin (Cookies) for web – Annotations
- How to log all active properties of a spring boot application before the beans instantiation?
- Best way of handling entities inheritance in Spring Data JPA
- Jackson date-format for OffsetDateTime in Spring Boot
- Using @RequestParam for multipartfile is a right way?
- Failed to load ApplicationContext caused by ArrayIndexOutOfBoundsException in ClassReader
- Disabling a filter for only a few paths