springboot项目前后端搭建

目录

一、前后端项目创建

 前端搭建

 二、首页功能

 代码生成:

 四、用户登录

五、前端及数据库密码加密

 六、服务端、客户端密码管理


一、前后端项目创建

 前端搭建

1.创建项目时如图(不需要勾选依赖)

springboot项目前后端搭建_第1张图片

 2、导入依赖(重新导入粗体黑色部分内容)


    4.0.0
    
        org.springframework.boot
        spring-boot-starter-parent
        2.3.9.RELEASE
         
    
    com.zking
    spbootpro
    0.0.1-SNAPSHOT
    spbootpro
    Demo project for Spring Boot


    
        1.8
    
    
        
        
            org.springframework.boot
            spring-boot-starter-freemarker
        

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

        
        
            mysql
            mysql-connector-java
            runtime
            5.1.44
        

        
        
            org.projectlombok
            lombok
            true
        

        
        
            org.springframework.boot
            spring-boot-starter-test
            test
            
                
                    org.junit.vintage
                    junit-vintage-engine
                
            
        

        
            junit
            junit
            test
        

        
        
            com.baomidou
            mybatis-plus-boot-starter
            3.4.0
        
        
        
            com.baomidou
            mybatis-plus-generator
            3.4.0
        

        
        
            com.zaxxer
            HikariCP
        

        
        
            commons-codec
            commons-codec
        

        
            org.apache.commons
            commons-lang3
            3.6
        

        
        
            org.springframework.boot
            spring-boot-starter-validation
        

        
        
            org.springframework.boot
            spring-boot-starter-data-redis
        

        
        
            org.apache.commons
            commons-pool2
        

        
        
        
            com.alipay.sdk
            alipay-easysdk
            2.0.1
        
    

    
        
            
                org.springframework.boot
                spring-boot-maven-plugin
            
        
    

3.配置文件application.properties-->转化为application.yml文件

server:
    port: 8081
    servlet:
        context-path: /
spring:
    datasource:
        url: jdbc:mysql://localhost:3306/spbootpro?useSSL=false&useUnicode=true&useJDBCCompliantTimezoneShift=true

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