我当前正在使用以下库:
compile group: 'com.microsoft.sqlserver', name: 'mssql-jdbc', version: '7.0.0.jre8'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: '2.1.1.RELEASE'
初始化MsSQL时,如果与MsSQL的连接失败,则应用程序不会启动。我需要更改此设置以使应用程序启动,并在再次调用DB时重试连接。与mongo db连接当前的工作方式类似。我没有运气就尝试了以下应用程序属性:
spring.datasource.continue-on-error=true