Springboot+Mybatis+jpa+thymeleaf实现增删改查

Springboot+Mybatis+jpa+thymeleaf

    • 项目结构
    • pom文件
    • Application配置文件
    • 实体类
    • controller层实现类
    • service层接口
    • service层实现类
    • dao层接口
    • 启动类
    • index.html首页
    • add.html添加页面
    • update.html更新页面
    • 创建user表
    • 添加表数据
    • 首页展示
    • 添加
    • 修改
    • 删除
    • 总结

项目结构

Springboot+Mybatis+jpa+thymeleaf实现增删改查_第1张图片

pom文件

配置相关依赖:


        UTF-8
        UTF-8
        1.8
    

    
        org.springframework.boot
        spring-boot-starter-parent
        2.1.6.RELEASE
    

    
        
            org.springframework.boot
            spring-boot-starter-web
        

        
        
            org.mybatis.spring.boot
            mybatis-spring-boot-starter
            2.0.1
        

        
            mysql
            mysql-connector-java
            runtime
        

        
        
            org.springframework.boot
            spring-boot-devtools
            runtime
            true
        

        
        
            org.springframework.boot
            spring-boot-starter-data-jpa
        
        
            org.springframework.data
            spring-data-jpa
            2.1.5.RELEASE
        

        
        
            org.springframework.boot
            spring-boot-starter-thymeleaf
        

        
        
            junit
            junit
        

        
            org.springframework.boot
            spring-boot-starter-test
        
    <

你可能感兴趣的:(java,spring,boot,mybatis)