#端口配置 server: port: 8080 #数据库驱动配置 spring: datasource: driver-class-name: com.mysql.jdbc.Driver url: jdbc:mysql://xx.xx.xx.xx:3306/xxxx?useUnicode=true&characterEncoding=utf-8 username: xxxx password: xxxx #配置mybatisc的xml文件路径(mapper是resource文件下自己创建的) mybatis: mapper-locations: classpath:mapper/*.xml #在controller或者service 读取配置文件信息只需要使用@value注解就行
spring boot yml文件最基础配置
最新推荐文章于 2024-07-25 11:59:12 发布