springboot 中配置log4j2 无法打印log
需要在mybatis-config.xml中追加
application.yml配置
spring:
datasource:
platform: oracle
driver-class-name: oracle.jdbc.OracleDriver
url: jdbc:oracle:thin:@(DEscriptION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.1)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = 数据库名)))
username:
password:
mvc:
view:
suffix: .jsp
main:
allow-bean-definition-overriding: true
mybatis:
mapper-locations: classpath*:com.**.xml
config-location: classpath:mybatis-config.xml
logging:
config: classpath:log4j2.xml