首页 > 编程语言 > 详细

Springboot框架:框架搭建

时间:2020-03-18 19:56:52      阅读:49      评论:0      收藏:0      [点我收藏+]

SpringBoot 框架搭建



 

 

  • IDEA下载安装
  • 构建与配置
    • 引入 SpringBoot模块:新建初始化项目 Spring Initializr,点击 next(此处要是出现 read time out报错信息,可以试试手机热点,亲测有效 ),修改 Group等相关信息,点击 next,点击加入相关的模块:webThtmeleafJPAMySQLAspectsDevTools,点击 finish创建项目完成。
    • application.yml配置,使用 thymeleaf 3:在 pom.xml文件中添加:
      <properties>
              <thymeleaf.version>3.0.2.RELEASE</thymeleaf.version>
              <thymeleaf-layout-dialect.version>2.1.1</thymeleaf-layout-dialect.version>
          </properties>
    • application.yml文件中添加:
      spring:
        thymeleaf:
          mode: HTML
    • 数据库连接配置:
      spring:
        datasource:
          driver-class-name: com.mysql.jdbc.Driver
          url: jdbc:mysql://localhost:3306/blog?useUnicode=true&characterEncoding=utf-8
          username: root
          password: root
    • jpa配置:
      spring:
          jpa:
              hibernate:
                ddl-auto: update
              show-sql: true
    • 日志配置:
      logging:
        level:
          root: info
          com.skgxsn: debug
        file: log/blog.log

       

 

Springboot框架:框架搭建

原文:https://www.cnblogs.com/skygrass0531/p/12519470.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!