spring boot mysql autoconfiguration (#1639)
* spring boot mysql autoconfiguration * exclude autoconfig from other main classes * update property condition
This commit is contained in:
@@ -4,6 +4,8 @@ import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.web.servlet.ServletComponentScan;
|
||||
|
||||
import com.baeldung.autoconfiguration.MySQLAutoconfiguration;
|
||||
|
||||
/**
|
||||
* using the following annotations are equivalent:
|
||||
* <ul><li>
|
||||
@@ -14,7 +16,7 @@ import org.springframework.boot.web.servlet.ServletComponentScan;
|
||||
* <code>@ServletComponentScan(basePackageClasses = {AttrListener.class, HelloFilter.class, HelloServlet.class, EchoServlet.class})</code>
|
||||
* </li></ul>
|
||||
*/
|
||||
@SpringBootApplication
|
||||
@SpringBootApplication(exclude=MySQLAutoconfiguration.class)
|
||||
@ServletComponentScan("com.baeldung.annotation.servletcomponentscan.components")
|
||||
public class SpringBootAnnotatedApp {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user