Spring Disable Auto Configuration

Posted by Ligar Mugi Syahid on March 09, 2023
1 min read · Last Modified: January 21, 2024
  • annotation
    @SpringBootApplication(exclude = {
      MongoAutoConfiguration.class, 
      MongoDataAutoConfiguration.class
    })
    
  • config file
    spring.autoconfigure.exclude= \
    org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration, \
    org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration
    

Tags: [ spring  ]