Spring Boot
SpringBoot 세팅할 때 DatasSource Exclude
DRAGON.Q
2017. 7. 19. 10:38
Spring boot를 세팅할때 DB를 사용하지 않고 세팅하고 싶을 때가 있다. 이럴때 기본 설정으로 세팅을 하면 아래와 같은 에러가 발생한다.
이유는 Spring boot는 기본적으로 db설정을 읽어서 세팅하는것 같다.
Description:
Cannot determine embedded database driver class for database type NONE
Action:
If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active).
@SpringBootApplication 에 exclude에 DataSourceAutoConfiguration.class 을 추가해주면 정상적으로 로딩이 된다.