概述
sql语句使数据库查询的基础,sql语句是否正确显得很重要,如果在mybatisplus中显示完整的语句呐?
配置
在application.yml中增加如下配置:
logging
:
level
:
com
.tensquare
.base
: debug
其中com.tensquare.base为包名,根据需要指定
pom文件
<dependency>
<groupId>org
.springframework
.boot
</groupId
>
<artifactId>spring
-boot
-starter
</artifactId
>
</dependency
>
<dependency>
<groupId>org
.springframework
.boot
</groupId
>
<artifactId>spring
-boot
-starter
-test
</artifactId
>
<scope>test
</scope
>
</dependency
>
<!--简化代码的工具包
-->
<dependency>
<groupId>org
.projectlombok
</groupId
>
<artifactId>lombok
</artifactId
>
<optional>true</optional
>
</dependency
>
<!--mybatis
-plus的springboot支持
-->
<dependency>
<groupId>com
.baomidou
</groupId
>
<artifactId>mybatis
-plus
-boot
-starter
</artifactId
>
<version>3.1.1</version
>
</dependency
>
<!--mysql驱动
-->
<dependency>
<groupId>mysql
</groupId
>
<artifactId>mysql
-connector
-java
</artifactId
>
<version>5.1.47</version
>
</dependency
>