初始化项目
1、码云创建代码库

2、下载码云项目到本地

3、IDEA直接生成springboot项目

接入mysql
1、配置文件


2、代码配置


启动项目
访问项目
访问连接:
http://localhost:8089/yc-blog/index/listlistContent
注意点:server.servlet.context-path
①如果不配置,则访问的根路径为/,例如http://localhost:8089/index/listlistContent
②如果配置,则访问的根路径为/配置的值,例如http://localhost:8089/yc-blog/index/listlistContent
访问报错
1、Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)




















