springboot failed to configure a datasource: ‘url‘ attribute is not specified and no em

resources配置application.yml

mybatis:
  configuration:
    mapUnderscoreToCamelCase: true
  typeAliasesPackage: com.demo.entity
  mapperLocations: classpath:mapper/*.xml
spring:
  datasource:
    username: root
    password: 123456
    url: jdbc:mysql://localhost:3306/springboot?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT
    driver-class-name: com.mysql.cj.jdbc.Driver
    

你可能感兴趣的:(spring,boot,后端,java)