Maven 配置
<? xml version = "1.0"encoding = "utf-8"?> <project xmlns = "http://maven.apache.org/pom/4.0.0"xmlns : xsi = "http://www.w3.org/2001/xmlschema-instance" xsi : schemalocation = "http://maven.apache.org/pom/4.0.0 http://maven.apache.org/xsd/maven-4.0.xsd"> <modeversion> 4.0.0 </modelversion> <groupid> cn.globalrave </group-artifacid> artifacid> <버전> 0.0.1-snapShot </version> <packaging> jar </packaging> <name> bar-web </name> <description> 스프링 부츠를위한 바 프로젝트 </descript> <부모> <groupid> org.spramframewort.boot </groupid> <artifactid> spring-boot-starter-parent </artifactid> <version> <! 저장소에서 부모 조회-> </parent> <properties> <project.build.build.build.sourceencoding> utf-8 </project.build.sourceencoding> <project.reporting.outputencoding> utf-8 </project.reporting.outputencoding> <java.versition> 1.8 </java. <!->-> <pectinement> <groupId> com.github.sd4324530 </groupid> <artifactid> fastweixin </artifactid> <3.3.15 </dependency> <!-mysql 驱动-> <pelepency> <groupid> mysql </groupid> <artifactid> mysql-connector-java </artifactid> </fectionement> <!-mybatis orm-> <prection> <groupid> org.mybatis.spring.spring.spring.boot </groupId> <artifactid> myBatis-s-spring-boot-starter </arevactid> 1.0 </version> </rependency> </version> </version> </version> </version> </version> </version> </version> </version> </version> </version> </version> </version> </version. <groupid> org.springframework.boot </groupid> <artifactid> spring-boot-starter-aop </artifactid> </fectionement> <pectionement> <groupid> org.spramframework.boot </groupid> <atifactid> spring-boot-starter-cache </artifactid> </delavency> <groupid> org.springframework.boot </groupid> <artifactid> Spring-Boot-Starter-freemarker </artifactid> </eppendency> <prection> <groupid> org.spramework.boot </groupid> <artifactid> spring-boot-starter-web </arepifactid> <groupid> org.springframework.boot </groupid> <artifactid> Spring-boot-starter-websocket </artifactid> </fectionency> <!-热部署-> <prection> <groupid> org.springframework.boot </groupid> <artifactid> spring-boot- devtools </artifactid> </의존성> <pectionency> <groupid> org.springframework.boot </groupid> <artifactid> Spring-boot-starter-test </artifactid> <scope> test </scope> </fexendencies> <build> <plugins> <groupin> <groupId> org.springframework.springframework.boot. <artifactid> Spring-Boot-Maven-Plugin </artifactid> <!-热部署配置-> <configuration> <fork> true </fork> </configuration> </plugin> </plugins> </build> </project>
아이디어 配置
• ctrl + shift + a 查找 勾选 勾选 프로젝트를 자동으로 만듭니다.
• ctrl+shift+alt+/ 查找 레지스트리 勾选 compiler.AUTOMAKE.ALLAK
DevTools 配置
默认改变 /meta-inf /maven, /meta-inf /resources, /resources, /static, /public 또는 /templates 等目录文件, 会重新重启项目, 当然我们编辑静态文件不想重启项目可以配置
spring.devtools.restart.exclude = static/**, public/** # devtools (devtoolsproperties) spring.devtools.livereload.enabled = true # livereload.com compatible server.spring.devtools.livereload.port = 35729 # sever exclud.restart.restart.restart.restart.restart.restart.devtool.restart.restart.spring.restart.restart.devtool.spring. 전체 재시작을 트리거하여 제외 해야하는 패턴 .Spring.devTools.restart.additional-paths = # 변경 사항을 시청할 추가 경로. Restart.spring.devtools.restart.exclude = Meta-Inf/Maven/**, Meta-Inf/Resources/**, Resources/**, static/**, public/**, 템플릿/**, **/*test.class, **/*tests.class, git.properties # 패턴이 제외되어야합니다. Restart.spring.devtools.restart.poll-interVal = 1000 # 클래스 경로 변경을위한 폴링 사이에 대기하는 시간 (밀리 초)의 양 (밀리 초) .Spring.devtools.restart.quiet-period = 400 # 조용한 시간 (Milliseconds)이 필요하지 않으면 서서 트리거. 변경할 때 재시작 확인이 트리거되는 특정 파일. ClassPath 파일 변경이 다시 시작되지 않으면 다시 시작됩니다. # Remote DevTools (RemotedEvToolsProperties) spring.devtools.remote.context-path =/. spring.spring.devtools.remote.debug.local-port = 8000 # 로컬 원격 디버그 서버 포트.spring.devtools.remote.proxy.host = # 원격 응용 프로그램에 연결하는 데 사용할 프록시의 호스트. application.spring.devtools.remote.restart.enabled = true # 원격 재시작을 활성화하십시오.
总结
Spring Boot 配置 아이디어 和 DevTools 热部署的方法, 希望对大家有所帮助 希望对大家有所帮助, 如果大家 有任何疑问欢迎给我留言, 小编会及时回复大家的! 小编会及时回复大家的!