intelij创建项目
不点击mysql,pol.xml里就没有mysql的依赖
mysql mysql-connector-java runtime
add as maven project
或者重启,要不然点击run没有效果
配置server,deployment点击run
没有连接mysql报错
application.properties配置mysql
server.port = 8888 //改变端口spring.datasource.url=jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf8spring.datasource.username=rootspring.datasource.password=123456spring.datasource.driver-class-name=com.mysql.jdbc.Driver