tnblog
首页
视频
资源
登录

在 application.yaml 配置文件里sqlserver配置

4589人阅读 2021/10/25 19:31 总访问:1054413 评论:0 收藏:0 手机
分类: Java

在 application.yaml 配置文件里

#spring:

#  datasource:

#    driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver

#    url: jdbc:sqlserver://ip地址:端口;DatabaseName=数据库名

#    username: 用户名

#    password: 密码

#    maxActive: 20

#    initialSize: 1

#    maxWait: 60000

#    minIdle: 1

#    timeBetweenEvictionRunsMillis: 60000

#    minEvictableIdleTimeMillis: 300000

#    validationQuery: select 1

#    testWhileIdle: true

#    testOnBorrow: true

#    testOnReturn: true

#    poolPreparedStatements: true

#    maxOpenPreparedStatements: 20


spring:

  datasource:

    driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver

    url: jdbc:sqlserver://localhost:1433;DatabaseName=HR

    username: sa

    password: 123456

    maxActive: 20

    initialSize: 1

    maxWait: 60000

    minIdle: 1

    timeBetweenEvictionRunsMillis: 60000

    minEvictableIdleTimeMillis: 300000

    validationQuery: select 1

    testWhileIdle: true

    testOnBorrow: true

    testOnReturn: true

    poolPreparedStatements: true

    maxOpenPreparedStatements: 20


评价
没有个性,不需要签名
排名
6
文章
6
粉丝
16
评论
8
{{item.articleTitle}}
{{item.blogName}} : {{item.content}}
ICP备案 :渝ICP备18016597号-1
网站信息:2018-2024TNBLOG.NET
技术交流:群号656732739
联系我们:contact@tnblog.net
欢迎加群交流技术