• eclipse 创建 springboot项目


    1. file --> new --> project --> Spring Boot  --> Spring  start  project
    2. Group:公司域名倒置,一般是com.xxx即可;Artiface:项目名

    1.  application.yml  文件内容

      server:
      port: 8880 #端口号


      spring:
      datasource:
      name: zksdb #数据库名称
      type: com.alibaba.druid.pool.DruidDataSource
      #druid相关配置
      druid:
      #监控统计拦截的filters
      filters: stat
      driver-class-name: com.mysql.jdbc.Driver
      #基本属性
      url: jdbc:mysql://127.0.0.1:3306/zksdb?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true
      username: root
      password: 123456
      #配置初始化大小/最小/最大
      initial-size: 1
      min-idle: 1
      max-active: 20
      #获取连接等待超时时间
      max-wait: 60000
      #间隔多久进行一次检测,检测需要关闭的空闲连接
      time-between-eviction-runs-millis: 60000
      #一个连接在池中最小生存的时间
      min-evictable-idle-time-millis: 300000
      validation-query: SELECT 'x'
      test-while-idle: true
      test-on-borrow: false
      test-on-return: false
      #打开PSCache,并指定每个连接上PSCache的大小。oracle设为true,mysql设为false。分库分表较多推荐设置为false
      pool-prepared-statements: false
      max-pool-prepared-statement-per-connection-size: 20
      ## 该配置节点为独立的节点,有很多同学容易将这个配置放在spring的节点下,导致配置无法被识别
      mybatis:
      mapper-locations: classpath:mapper/*.xml #注意:一定要对应mapper映射xml文件的所在路径
      type-aliases-package: com.winterchen.model # 注意:对应实体类的路径

      #pagehelper
      pagehelper:
      helperDialect: mysql
      reasonable: true
      supportMethodsArguments: true
      params: count=countSql
      returnPageInfo: check


  • 相关阅读:
    java内部类
    接口与继承
    数据结构
    数据I/O流
    课程总结
    第六次实训作业异常处理
    常用类的课后作业
    窗口实训1
    实训作业4
    实训作业3
  • 原文地址:https://www.cnblogs.com/linanana/p/12013330.html
Copyright © 2020-2023  润新知