一、创建SpringBoot项目

1、开始创建项目

 2、勾选所需要的依赖库

 三、在application.yml文件配置Tomcat

server:
  tomcat:
    uri-encoding: UTF-8
    threads:
      max: 200
      min-spare: 30
    connection-timeout: 5000ms
  port: 8080
  servlet:
    context-path: /emos-wx-api

四、配置数据库

#pom 引入阿里巴巴数据库驱动
  <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid-spring-boot-starter</artifactId>
            <version>1.1.13</version>
 </dependency>
#yml引入一下数据库配置
spring:
  datasource:
    type: com.alibaba.druid.pool.DruidDataSource
    druid:
      driver-class-name: com.mysql.cj.jdbc.Driver
      url: jdbc:mysql://localhost:3306/emos?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
      username: root
      password: abc123456
      initial-size: 8
      max-active: 16
      min-idle: 8
      max-wait: 60000
      test-while-idle: true
      test-on-borrow: false
      test-on-return: false

 五、配置application.yml所有文件

server:
  tomcat:
    uri-encoding: UTF-8
    threads:
      max: 200
      min-spare: 30
    connection-timeout: 5000ms
  port: 8080
  servlet:
    context-path: /emos-wx-api

spring:
  datasource:
    type: com.alibaba.druid.pool.DruidDataSource
    druid:
      driver-class-name: com.mysql.cj.jdbc.Driver
      url: jdbc:mysql://localhost:3306/emos?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
      username: root
      password: admin888
      initial-size: 8
      max-active: 16
      min-idle: 8
      max-wait: 60000
      test-while-idle: true
      test-on-borrow: false
      test-on-return: false

  redis:
    database: 0
    host: 47.96.1526.785
    port: 6379
    password: gaobin
    jedis:
      pool:
        max-active: 1000
        max-wait: -1ms
        max-idle: 16
        min-idle: 8

  data:
    mongodb:
      host: 47.96.1526.785
      port: 27017
      database: admin
      authentication-database: admin
      username: admin
      password: abc123456
  mail:
    default-encoding: UTF-8
    host: smtp.aliyun.com
    username: yangdi525@aliyun.com
    password: ax105105
mybatis:
  mapper-locations: classpath*:mapper/*.xml
  type-aliases-package: com.example.emos.wx.db.pojo
  configuration:
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
    map-underscore-to-camel-case: true

logging:
  level:
    root: info
    com.example.emos.wx.db.dao : warn
  pattern:
    console: "%d{HH:mm:ss}  %-5level  %msg%n"

emos:
  jwt:
    secret: abc123456
    expire: 5
    cache-expire: 10
  face:
    createFaceModelUrl: http://CentOS的IP地址:3000/create_face_model
    checkinUrl: http://CentOS的IP地址:3000/checkin
  email:
    system: 邮箱地址1
    hr: 邮箱地址2
  image-folder: D:/emos/image
  code: HelloWorld
  recieveNotify: http://PC电脑的IP地址:8080/emos-wx-api/meeting/recieveNotify
workflow:
  url: http://CentOS的IP地址:9090/emos-workflow

trtc:
  appid: TRTC的APPID
  key: TRTC的密钥
  expire: 86400
wx:
  app-id: 微信小程序APPID
  app-secret: 微信小程序密钥

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

成序原

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值