记录一下解决方法:
报错内容:
If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).
解决方法:
在@SpringBootApplication()注解中加入
exclude = {DataSourceAutoConfiguration.class}
即:
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
第二个问题:
Consider defining a bean of type ‘com.itwyc.springcloud.mapper.DeptMapper’ in your configuration.
解决方法:
在springboot启动类中加入注解
@ComponentScan(basePackages = “xxx”)
xxx为mapper所在包的url,比如我的是com.itwyc.springcloud.mapper