美文网首页
启动Spring Boot 项目 报错:Application

启动Spring Boot 项目 报错:Application

作者: 金1746 | 来源:发表于2018-12-21 18:26 被阅读0次

错误信息:

image.png

看不出具体是哪里出了错,后来经过同事提醒,配置文件中数据库密码有特殊字符

spring:
  datasource:
     driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
     url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=sjdsx;autoReconnect=true
     username: sa
     password: !+r@sSsMGC1@@i25*w
  jpa:
     database: sql_server
     hibernate:
       ddl-auto: none
     show-sql: true
     database-platform: org.hibernate.dialect.SQLServer2008Dialect

需要加上引号:

spring:
  datasource:
     driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
     url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=sjdsx;autoReconnect=true
     username: sa
     password: '!+r@sSsMGC1@@i25*w'
  jpa:
     database: sql_server
     hibernate:
       ddl-auto: none
     show-sql: true
     database-platform: org.hibernate.dialect.SQLServer2008Dialect

相关文章

网友评论

      本文标题:启动Spring Boot 项目 报错:Application

      本文链接:https://www.haomeiwen.com/subject/nhyvkqtx.html