113 lines
19 KiB
HTML
113 lines
19 KiB
HTML
<p>一、字体设置</p>
|
||
<p> <img src="https://img2020.cnblogs.com/blog/99357/202003/99357-20200325090846455-1685654034.png" alt="" /></p>
|
||
<p> </p>
|
||
<p> </p>
|
||
<p> </p>
|
||
<p>二、自动导入java包和自动清除无用的引用</p>
|
||
<p>清除无用的import包手动快捷键:Ctrl + Alt + <span class="hljs-keyword">O</span></p>
|
||
<p>添加引用在代码中光标指向需要添加引用的上,然后使用快捷键:Alt+Enter</p>
|
||
<p>需要完全自动引用可进行如下设置中:</p>
|
||
<p><img src="https://img2020.cnblogs.com/blog/99357/202003/99357-20200325091753147-1782501829.png" alt="" /></p>
|
||
<p> </p>
|
||
<p> </p>
|
||
<p> </p>
|
||
<p>三、修改Maven,使下载速度更快</p>
|
||
<p><img src="https://img2020.cnblogs.com/blog/99357/202003/99357-20200325092158725-1660973743.png" alt="" /></p>
|
||
<p> </p>
|
||
<p> </p>
|
||
<p>xml文件内容如下:</p>
|
||
<div class="cnblogs_code">
|
||
<pre><span style="color: #0000ff;"><?</span><span style="color: #ff00ff;">xml version="1.0" encoding="UTF-8"</span><span style="color: #0000ff;">?></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">project </span><span style="color: #ff0000;">xmlns</span><span style="color: #0000ff;">="http://maven.apache.org/POM/4.0.0"</span><span style="color: #ff0000;"> xmlns:xsi</span><span style="color: #0000ff;">="http://www.w3.org/2001/XMLSchema-instance"</span><span style="color: #ff0000;">
|
||
xsi:schemaLocation</span><span style="color: #0000ff;">="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">modelVersion</span><span style="color: #0000ff;">></span>4.0.0<span style="color: #0000ff;"></</span><span style="color: #800000;">modelVersion</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">parent</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">groupId</span><span style="color: #0000ff;">></span>org.springframework.boot<span style="color: #0000ff;"></</span><span style="color: #800000;">groupId</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">artifactId</span><span style="color: #0000ff;">></span>spring-boot-starter-parent<span style="color: #0000ff;"></</span><span style="color: #800000;">artifactId</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">version</span><span style="color: #0000ff;">></span>2.1.5.RELEASE<span style="color: #0000ff;"></</span><span style="color: #800000;">version</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">relativePath</span><span style="color: #0000ff;">/></span> <span style="color: #008000;"><!--</span><span style="color: #008000;"> lookup parent from repository </span><span style="color: #008000;">--></span>
|
||
<span style="color: #0000ff;"></</span><span style="color: #800000;">parent</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">groupId</span><span style="color: #0000ff;">></span>com.louis.springboot<span style="color: #0000ff;"></</span><span style="color: #800000;">groupId</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">artifactId</span><span style="color: #0000ff;">></span>demo<span style="color: #0000ff;"></</span><span style="color: #800000;">artifactId</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">version</span><span style="color: #0000ff;">></span>0.0.1-SNAPSHOT<span style="color: #0000ff;"></</span><span style="color: #800000;">version</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">name</span><span style="color: #0000ff;">></span>demo<span style="color: #0000ff;"></</span><span style="color: #800000;">name</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">description</span><span style="color: #0000ff;">></span>Demo project for Spring Boot<span style="color: #0000ff;"></</span><span style="color: #800000;">description</span><span style="color: #0000ff;">></span>
|
||
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">properties</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">java.version</span><span style="color: #0000ff;">></span>1.8<span style="color: #0000ff;"></</span><span style="color: #800000;">java.version</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"></</span><span style="color: #800000;">properties</span><span style="color: #0000ff;">></span>
|
||
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">dependencies</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">dependency</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">groupId</span><span style="color: #0000ff;">></span>org.springframework.boot<span style="color: #0000ff;"></</span><span style="color: #800000;">groupId</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">artifactId</span><span style="color: #0000ff;">></span>spring-boot-starter<span style="color: #0000ff;"></</span><span style="color: #800000;">artifactId</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"></</span><span style="color: #800000;">dependency</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #008000;"><!--</span><span style="color: #008000;"> web </span><span style="color: #008000;">--></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">dependency</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">groupId</span><span style="color: #0000ff;">></span>org.springframework.boot<span style="color: #0000ff;"></</span><span style="color: #800000;">groupId</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">artifactId</span><span style="color: #0000ff;">></span>spring-boot-starter-web<span style="color: #0000ff;"></</span><span style="color: #800000;">artifactId</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"></</span><span style="color: #800000;">dependency</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #008000;"><!--</span><span style="color: #008000;"> swagger </span><span style="color: #008000;">--></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">dependency</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">groupId</span><span style="color: #0000ff;">></span>io.springfox<span style="color: #0000ff;"></</span><span style="color: #800000;">groupId</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">artifactId</span><span style="color: #0000ff;">></span>springfox-swagger2<span style="color: #0000ff;"></</span><span style="color: #800000;">artifactId</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">version</span><span style="color: #0000ff;">></span>2.9.2<span style="color: #0000ff;"></</span><span style="color: #800000;">version</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"></</span><span style="color: #800000;">dependency</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">dependency</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">groupId</span><span style="color: #0000ff;">></span>io.springfox<span style="color: #0000ff;"></</span><span style="color: #800000;">groupId</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">artifactId</span><span style="color: #0000ff;">></span>springfox-swagger-ui<span style="color: #0000ff;"></</span><span style="color: #800000;">artifactId</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">version</span><span style="color: #0000ff;">></span>2.9.2<span style="color: #0000ff;"></</span><span style="color: #800000;">version</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"></</span><span style="color: #800000;">dependency</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #008000;"><!--</span><span style="color: #008000;"> mybatis </span><span style="color: #008000;">--></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">dependency</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">groupId</span><span style="color: #0000ff;">></span>org.mybatis.spring.boot<span style="color: #0000ff;"></</span><span style="color: #800000;">groupId</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">artifactId</span><span style="color: #0000ff;">></span>mybatis-spring-boot-starter<span style="color: #0000ff;"></</span><span style="color: #800000;">artifactId</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">version</span><span style="color: #0000ff;">></span>2.0.0<span style="color: #0000ff;"></</span><span style="color: #800000;">version</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"></</span><span style="color: #800000;">dependency</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #008000;"><!--</span><span style="color: #008000;"> mysql </span><span style="color: #008000;">--></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">dependency</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">groupId</span><span style="color: #0000ff;">></span>mysql<span style="color: #0000ff;"></</span><span style="color: #800000;">groupId</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">artifactId</span><span style="color: #0000ff;">></span>mysql-connector-java<span style="color: #0000ff;"></</span><span style="color: #800000;">artifactId</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"></</span><span style="color: #800000;">dependency</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #008000;"><!--</span><span style="color: #008000;"> pagehelper </span><span style="color: #008000;">--></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">dependency</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">groupId</span><span style="color: #0000ff;">></span>com.github.pagehelper<span style="color: #0000ff;"></</span><span style="color: #800000;">groupId</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">artifactId</span><span style="color: #0000ff;">></span>pagehelper-spring-boot-starter<span style="color: #0000ff;"></</span><span style="color: #800000;">artifactId</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">version</span><span style="color: #0000ff;">></span>1.2.5<span style="color: #0000ff;"></</span><span style="color: #800000;">version</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"></</span><span style="color: #800000;">dependency</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">dependency</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">groupId</span><span style="color: #0000ff;">></span>org.springframework.boot<span style="color: #0000ff;"></</span><span style="color: #800000;">groupId</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">artifactId</span><span style="color: #0000ff;">></span>spring-boot-starter-test<span style="color: #0000ff;"></</span><span style="color: #800000;">artifactId</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">scope</span><span style="color: #0000ff;">></span>test<span style="color: #0000ff;"></</span><span style="color: #800000;">scope</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"></</span><span style="color: #800000;">dependency</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"></</span><span style="color: #800000;">dependencies</span><span style="color: #0000ff;">></span>
|
||
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">build</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">plugins</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">plugin</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">groupId</span><span style="color: #0000ff;">></span>org.springframework.boot<span style="color: #0000ff;"></</span><span style="color: #800000;">groupId</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">artifactId</span><span style="color: #0000ff;">></span>spring-boot-maven-plugin<span style="color: #0000ff;"></</span><span style="color: #800000;">artifactId</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"></</span><span style="color: #800000;">plugin</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"></</span><span style="color: #800000;">plugins</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #008000;"><!--</span><span style="color: #008000;"> 打包时拷贝MyBatis的映射文件 </span><span style="color: #008000;">--></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">resources</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">resource</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">directory</span><span style="color: #0000ff;">></span>src/main/java<span style="color: #0000ff;"></</span><span style="color: #800000;">directory</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">includes</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">include</span><span style="color: #0000ff;">></span>**/sqlmap/*.xml<span style="color: #0000ff;"></</span><span style="color: #800000;">include</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"></</span><span style="color: #800000;">includes</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">filtering</span><span style="color: #0000ff;">></span>false<span style="color: #0000ff;"></</span><span style="color: #800000;">filtering</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"></</span><span style="color: #800000;">resource</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">resource</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">directory</span><span style="color: #0000ff;">></span>src/main/resources<span style="color: #0000ff;"></</span><span style="color: #800000;">directory</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">includes</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">include</span><span style="color: #0000ff;">></span>**/*.*<span style="color: #0000ff;"></</span><span style="color: #800000;">include</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"></</span><span style="color: #800000;">includes</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"><</span><span style="color: #800000;">filtering</span><span style="color: #0000ff;">></span>true<span style="color: #0000ff;"></</span><span style="color: #800000;">filtering</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"></</span><span style="color: #800000;">resource</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"></</span><span style="color: #800000;">resources</span><span style="color: #0000ff;">></span>
|
||
<span style="color: #0000ff;"></</span><span style="color: #800000;">build</span><span style="color: #0000ff;">></span>
|
||
|
||
<span style="color: #0000ff;"></</span><span style="color: #800000;">project</span><span style="color: #0000ff;">></span></pre>
|
||
</div>
|
||
<p> </p> |