Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

将项目直接导入到idea中启动会报错, #1

Closed
xihazhiwang opened this issue Jan 9, 2018 · 5 comments
Closed

将项目直接导入到idea中启动会报错, #1

xihazhiwang opened this issue Jan 9, 2018 · 5 comments
Labels
question Further information is requested

Comments

@xihazhiwang
Copy link


APPLICATION FAILED TO START


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).

Process finished with exit code 1

应该在启动类中加入@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})注解,原因:这是因为spring boot默认会加载org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration类,DataSourceAutoConfiguration类使用了@configuration注解向spring注入了dataSource bean。因为工程中没有关于dataSource相关的配置信息,当spring创建dataSource bean因缺少相关的信息就会报错。
解决方案来源:https://www.cnblogs.com/yql1986/p/6819097.html

@lenve
Copy link
Owner

lenve commented Jan 9, 2018

@xihazhiwang
也可以参考下这个lenve/VBlog#1

@shuaishuaihand
Copy link

这个错误是怎么回事?
Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2018-01-12 17:20:29.265 ERROR 1288 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :

Description:

Field menuMapper in org.sang.service.MenuService required a bean of type 'org.sang.mapper.MenuMapper' that could not be found.

Action:

Consider defining a bean of type 'org.sang.mapper.MenuMapper' in your configuration.

@lenve
Copy link
Owner

lenve commented Jan 17, 2018

@shuaishuaihand
hello哥们,你的问题解决了吗?

@xihazhiwang
Copy link
Author

@lenve @shuaishuaihand 不用我这么麻烦,参考这个https://github.com/lenve/VBlog/issues/1 narakai 的回复就可以了

@lenve
Copy link
Owner

lenve commented Jan 17, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants