spring boot 笔记

Failed to configure a DataSource: ‘url’ attribute is not specified and no embedded datasource could be configured

spring boot需要配置好datasource才可以正常运行,在properties中

spring.datasource.url=jdbc:mysql://localhost:3306/mysql 
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
 

@RestController

这个标签是@Controller 和@ResponseBody的组合

如果遇到8080端口被占用,The Tomcat connector configured to listen on port 8080 failed to start intellij idea

1 netstat -ao |find /i “listening”,查看8080端口被哪个进程占用

TCP 0.0.0.0:7981 machinename:0 LISTENING 2428 

TCP 0.0.0.0:7982 machinename:0 LISTENING 2428 

TCP 0.0.0.0:8080 machinename:0 LISTENING 12704 

TCP 0.0.0.0:8500 machinename:0 LISTENING 2428

2 Taskkill /F /IM 12704 (Note: Mention correct Process Id),杀掉此进程

Avatar photo

About Blackford

这是个最好的时代,这是个最坏的时代,这是个充满希望的春天,这是个令人绝望的冬天,我们前面什么都有,我们前面什么都没有。梦想,让我们一次次的走远,又一次次的回头,一个关于人生的梦想还在不断奔跑,带着喜悦和疼痛,不过一切才刚刚开始,并且直到今天也远远没有结束
This entry was posted in 架构运维. Bookmark the permalink.

发表评论

电子邮件地址不会被公开。 必填项已用*标注