> 文档中心 > 手把手带你做SpringBoot实战项目(2 )(持续更新中)

手把手带你做SpringBoot实战项目(2 )(持续更新中)


手把手Springboot实战项目1

进入到项目界面

在这里插入图片描述
然后我们在com.example.demo创建我们的项目需要的文件夹

  1. POJO //domain类
  2. Controller //控制层
  3. Mapper //Mapper接口
  4. Service //业务层
  5. Filter //拦截器
  6. Config //配置类
  7. Security //权限控制

在这里插入图片描述

我这里把Application.properties改成了Application.yml

在这里插入图片描述

进入application.yml中我们写一下最基本的配置和数据源

server:  port: 8080spring:  datasource:    driver-class-name: com.mysql.cj.jdbc.Driver    url: jdbc:mysql://localhost:3306/blog?useSSL=false&&allowPublicKeyRetrieval=true&&useUnicode=true&characterEncoding=UTF-8    username: root    password: root

这样就可以启动运行成功项目了
在这里插入图片描述
在这里插入图片描述
有问题的可以私信我