依赖:(驱动)

  <!-- https://mvnrepository.com/artifact/net.sourceforge.jtds/jtds -->
         <dependency>
            <groupId>net.sourceforge.jtds</groupId>
            <artifactId>jtds</artifactId>
            <version>1.3.1</version>
        </dependency> 

 

配置:application.yml

spring:
  datasource:
    username: 213
    password: 3213
    url: jdbc:jtds:sybase://192.168.103.13:2094/acct
    driver-class-name: net.sourceforge.jtds.jdbc.Driver
    hikari:
      connection-test-query: SELECT 1
      idle-timeout: 60000
      minimum-idle: 5
      maximum-pool-size: 20

# Hikari will use the above plus the following to setup connection pooling
#spring.datasource.type=com.zaxxer.hikari.HikariDataSource
#spring.datasource.hikari.minimum-idle=5
#spring.datasource.hikari.maximum-pool-size=15
#spring.datasource.hikari.auto-commit=true
#spring.datasource.hikari.idle-timeout=30000
#spring.datasource.hikari.pool-name=DatebookHikariCP
#spring.datasource.hikari.max-lifetime=1800000
#spring.datasource.hikari.connection-timeout=30000
#spring.datasource.hikari.connection-test-query=SELECT 1

 

 

posted on 2018-11-09 17:27  lshan  阅读(1734)  评论(0编辑  收藏  举报