本文共 480 字,大约阅读时间需要 1 分钟。
mybatis 需要数据源, 需配置application,采用yaml进行配置
注意缩进# mysqlspring: datasource: #MySQL配置 driverClassName: com.mysql.cj.jdbc.Driver #sql -》 数据库名称 url: jdbc:mysql://localhost:3306/sql?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=UTC # 数据库用户名 密码 username: root password: rootmybatis: mapper-locations: classpath:mapper/*.xml type-aliases-package: com.example.demo.modelserver: port: 9000
转载地址:http://aiegf.baihongyu.com/