1、入门的视频:
https://www.imooc.com/learn/767
https://www.imooc.com/learn/810
Spring Boot 自带Tomcat,在idea里创建spring boot后默认创建了一个运行的配置文件,可以直接运行
2、多个模块启动:编辑配置启动,选择maven,启动模块的目录,命令行输入:
spring-boot:run
3、打包:用maven
maven Project:install
修改配置文件,设置jar,或 war 格式,jar默认不会打包webapp里的内容,可用通过java -jar 文件名.jar运行;
war可用通过java命令直接运行,放到tomcat里需要设置不启用内部自带的tomcat;
打包参考:https://www.cnblogs.com/sxdcgaq8080/p/7727249.html
设置不启用自带的Tomcat用maven打包时报 com.sun.xml.internal.ws.** 不存在错误,添加maven-compiler-plugin插件,并且配置compilerArguments;参考:http://www.bubuko.com/infodetail-1532181.html
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<compilerArguments>
<bootclasspath>${JAVA_HOME}/jre/lib/rt.jar</bootclasspath>
</compilerArguments>
</configuration>
</plugin>