spring项目的常用配置文件

数据库配置代码:

#数据库连接配置
spring:
    datasource:
        url: jdbc:mysql://localhost:3306/mybatis_sql?characterEncoding=utf8&useSSL=false
        username: root
        password: root
        driver-class-name: com.mysql.cj.jdbc.Driver

配置mybatis xml 文件路径:

mybatis:
    mapper-locations: classpath:mapper/**Mapper.xml

数据持久层的实现,xml代码:




 

配置Mybatis 打印日志

mybatis:
    configuration:    #配置打印 Mybatis 执行的SQL
        log-impl: org.apache.ibatis.logging.stdout.StdOutImpl

你可能感兴趣的:(环境配置,javaEE,java,spring,开发语言)