This project uses springboot + mybatis + logback. In order to print SQL on the console, various configurations have been made in the configuration file. All the methods available on the Internet have been tried, but SQL statements are still not printed.
This is indicated in the configuration file logging.level.cn . homecredit.sams.ddme . reconciliation.model.mapper=debug . still do not print SQL statements.
Another SpringBoot project, as like as two peas, is able to print SQL statements on the console. By comparing the differences between the two projects step by step, it is found that the project can be printed after the histrix package is introduced.
<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-hystrix</artifactId> </dependency>
In the end, I don’t know what the reason is, but after introducing this package, the problem is solved.
Note that this is only one of the possible reasons for this problem. In addition, there are many other problems that may result in the inability to print SQL on the console. You need to configure every step.
- Integration openfeign failed to start
- After Nacos started, the client worker log was printed all the time
- Springboot integrated with mybatis
- Error parsing lifecycle processing instructions
- [Fixed]No bean named ‘sqlSessionFactoryBean’ available
- Mybatis idea environment integration jar package
- Error processing condition on org.springframework.boot . autoconfigure.context.Property Error report solution
- Solution of redisconnection factory in springboot2 not Autowired
- Update project manually_ Solution of too large jar package in springboot
- Springboot error: property ‘sqlsessionfactory’ or ‘sqlsessiontemplate’ are required error details
- Solution to the failure of springboot integrated PageHelper
- Springboot: start error reporting after introducing paging plug-in PageHelper
- Solve the problem of There was an unexpected error (type=Internal Server Error, status=500) (using Thymeleaf to report an error)
- Maven project pom.xml Solutions to error reporting
- Failed to configure a DataSource
- pom.xml Depending on the error report, the problem of missing artifact XXX is solved
- Failed to execute goal com.spotify:docker-maven-plugin:1.0.0:build Exception caught: basedir src/mai
- Spring boot problem 1: error reporting life processing instructions for building a spring boot project
- Springboot startup error: java.lang.IllegalArgumentException : Property ‘sqlSessionFactory’ or ‘sqlSessionTempla
- Idea Maven project uses package to package and report error (package does not exist)