1,新建一个项目,项目结构
springboot连接mysql数据库获得数据(4)
2,编写配置文件一定要注意红线部分,没有的话会包时区错误。
springboot连接mysql数据库获得数据(4)
3,编写controller 代码,
springboot连接mysql数据库获得数据(4)
4,完成后启动测试,在地址栏写localhost:8080/q
springboot连接mysql数据库获得数据(4)
结束语,可以看到已经获得数据库的数据了,说明springboot连接mysel成功。

相关文章:

  • 2021-06-11
  • 2021-12-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-22
  • 2021-12-27
  • 2021-06-20
猜你喜欢
  • 2021-09-25
  • 2021-08-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案