spring boot web开发 简单的增删改查和spring boot 自带的Junit测试 案例

创建 web项目  

配置pom.xml文件   ------相当于jar包

配置application.yml -----配置文件(spring数据库连接、server服务、logging日志等)

创建 package  (entity、controller、service、configuration、repository、interceptor等)

小例子:

entity:Person

数据持久化(dao):

扫描二维码关注公众号,回复: 2309587 查看本文章

 controller:

spring 自带Junit测试@SpringBootTest,不用自己在pom.xml里配置Junit

猜你喜欢

转载自www.cnblogs.com/xiqoqu/p/9351080.html