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

Spring boot启动报错 #1

Closed
narakai opened this issue Dec 27, 2017 · 9 comments
Closed

Spring boot启动报错 #1

narakai opened this issue Dec 27, 2017 · 9 comments
Labels

Comments

@narakai
Copy link

narakai commented Dec 27, 2017

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

@lenve
Copy link
Owner

lenve commented Dec 27, 2017

@narakai
看这个提示是数据问题。你从以下几方面来检查下:
1.数据库驱动是否加载到了
2.数据配置是否修改了
3.本地数据库是否可以正常访问

@lenve
Copy link
Owner

lenve commented Dec 27, 2017

@narakai
我刚刚增加了数据库连接池,你重新clone再试下

@narakai
Copy link
Author

narakai commented Dec 27, 2017

刚试了下,还是报同样的错

我的datasource:数据库可以访问到

spring.datasource.url=jdbc:mysql://localhost:3306/vueblog?useUnicode=true&characterEncoding=UTF-8
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.username=root
spring.datasource.password=root
mybatis.config-location=classpath:/mybatis-config.xml

server.port=8081
logging.level.org.springframework.security=info

@lenve
Copy link
Owner

lenve commented Dec 27, 2017

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

@zccccccc
Copy link

zccccccc commented Dec 27, 2017

@narakai
resources文件 右键设置文件类型 Mark Directory as ==> Resources ROOT

@narakai
Copy link
Author

narakai commented Dec 27, 2017

@lenve @zccccccc zccccccc这哥们的方法是对的,谢谢,搞了一天...

@cqran
Copy link

cqran commented Jan 8, 2018

Eclipse的 :项目上右键选择properties,然后点击java build path,添加 source:add folder
把resources 文件夹添加为 资源目录。

@Dwannn
Copy link

Dwannn commented Feb 1, 2018

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2018-02-01 15:27:48.014 ERROR 7188 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :


APPLICATION FAILED TO START


Description:

Field userMapper in org.sang.service.UserService required a bean of type 'org.sang.mapper.UserMapper' that could not be found.

Action:

Consider defining a bean of type 'org.sang.mapper.UserMapper' in your configuration.
发现是包有中文名导致的。改完后就遇到@narakai 哥们相同的问题,我的是eclipse,用的是@cqran 提供的方法,成功跑起来。感谢

@Starriers
Copy link

无法修改 server.port 而且登录localhost:8080/index.html 需要输入用户名密码

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

No branches or pull requests

6 participants