怎么在想法中格式化SQL代码

  介绍

怎么在想法中格式化SQL代码?很多新手对此不是很清楚,为了帮助大家解决这个难题,下面小编将为大家详细讲解,有这方面需求的人可以来学习下,希望你能有所收获。


怎么在想法中格式化SQL代码

1.2,基本操作,很多,增删改查,控制台SQL编写等等

怎么在想法中格式化SQL代码

SQL执行控制台,这里是格式化之后的,我们平时手写的SQL都是没有格式化的,注意这里提供了输入框,操作占位符的参数也很方便…

怎么在想法中格式化SQL代码

那么这里的格式化的SQL是怎么实现的呢? ?

这里的哈,想法的快捷键Ctrl + alt + L,就可以格式化SQL

怎么在想法中格式化SQL代码

<强>补充:解决想法的src目录下不能编SQL语译句的xml配置文件的问题

一:正常配置下的情况

1。编译的目录下不会编译映射配置文件。xml,但是资源目录中的文件都被编译出来。

怎么在想法中格式化SQL代码

2.砰的一声。xml文件的配置

& lt; ? xml  version=?.0“,编码=癠TF-8" ?祝辞,   & lt; project  xmlns=癶ttp://maven.apache.org/POM/4.0.0", xmlns: xsi=癶ttp://www.w3.org/2001/XMLSchema-instance"   ,xsi: schemaLocation=癶ttp://maven.apache.org/POM/4.0.0 , http://maven.apache.org/xsd/maven-4.0.0.xsd"比;   ,& lt; modelVersion> 4.0.0   ,   ,& lt; groupId> com.sly   ,& lt; artifactId> hrm01   ,& lt; version> 1.0 -snapshot   ,& lt; packaging> war   ,   ,& lt; name> hrm01  Maven  Webapp   ,& lt; !——, FIXME  change  it 用,项目# 39;s  website ——比;   ,& lt; url> http://www.example.com</url>   ,   ,& lt; properties>   ,& lt; project.build.sourceEncoding> UTF-8   ,& lt; maven.compiler.source> 1.7 & lt;/maven.compiler.source>   ,& lt; maven.compiler.target> 1.7 & lt;/maven.compiler.target>   ,& lt;/properties>   ,   ,& lt; dependencies>   ,& lt; dependency>   & lt;才能groupId> junit</groupId>   & lt;才能artifactId> junit</artifactId>   & lt;才能version> 4.11 & lt;/version>   & lt;才能scope> test</scope>   ,& lt;/dependency>   ,& lt; !——,导入jar包   春天,1.的jar包:11个   ,com.springsource.org.aopalliance-1.0.0.jar   ,com.springsource.org.aspectj.weaver-1.6.8.RELEASE.jar   ,spring-aop-5.0.1.RELEASE.jar   ,spring-aspects-5.0.1.RELEASE.jar   ,spring-beans-5.0.1.RELEASE.jar   ,spring-context-5.0.1.RELEASE.jar   ,spring-core-5.0.1.RELEASE.jar   ,spring-expression-5.0.1.RELEASE.jar   ,spring-jcl-5.0.1.RELEASE.jar   ,spring-jdbc-5.0.1.RELEASE.jar   ,spring-tx-5.0.1.RELEASE.jar   ,——比;   & lt;才能!——,https://mvnrepository.com/artifact/org.aopalliance/com.springsource.org.aopalliance ——比;   & lt;才能dependency>   & lt;才能groupId> org.aopalliance</groupId>   & lt;才能artifactId> com.springsource.org.aopalliance</artifactId>   & lt;才能version> 1.0.0</version>   & lt;才能/dependency>   & lt;才能!——,https://mvnrepository.com/artifact/org.aspectj/com.springsource.org.aspectj.weaver ——比;   & lt;才能dependency>   ,,& lt; groupId> org.aspectj   ,,& lt; artifactId> com.springsource.org.aspectj.weaver   ,,& lt; version> 1.6.4.RELEASE   & lt;才能/dependency>   ,& lt; !——, https://mvnrepository.com/artifact/org.springframework/spring-aop ——比;   ,& lt; dependency>   & lt;才能groupId> org.springframework</groupId>   & lt;才能artifactId> spring-aop</artifactId>   & lt;才能version> 5.0.10.RELEASE</version>   ,& lt;/dependency>   ,& lt; dependency>   & lt;才能groupId> org.springframework</groupId>   & lt;才能artifactId> spring-aspects</artifactId>   & lt;才能version> 5.1.0.RELEASE</version>   ,& lt;/dependency>   ,& lt; dependency>   & lt;才能groupId> org.springframework</groupId>   & lt;才能artifactId> spring-beans</artifactId>   & lt;才能version> 5.0.1.RELEASE</version>   ,& lt;/dependency>   ,& lt; dependency>   & lt;才能groupId> org.springframework</groupId>   & lt;才能artifactId> spring-context</artifactId>   & lt;才能version> 5.0.1.RELEASE</version>   ,& lt;/dependency>   ,& lt; dependency>   & lt;才能groupId> org.springframework</groupId>   & lt;才能artifactId> spring-core</artifactId>   & lt;才能version> 5.0.1.RELEASE</version>   ,& lt;/dependency>   ,& lt; dependency>   & lt;才能groupId> org.springframework</groupId>   & lt;才能artifactId> spring-expression</artifactId>   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null   null

怎么在想法中格式化SQL代码