メイブン配置
<?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 <http://www.w3.org/2001 xsi:schemalocation = "http://maven.apache.org/pom/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.0.sdsd" <artifactid> bar-web </artifactid> <バージョン> 0.0.1-snapshot </version> <packaging> jar </packaging> <name> bar-web </name> <説明> barプロジェクト<バージョン> 1.5.6.Release </version> <RecationPath/> <! - リポジトリからの外観親 - > </parent> <Properties> <Project.Build.SourceEncoding> UTF-8 </Project.Build.SourceEncoding> <Project.Reporting.Outputencoding> <Java.version> 1.8 </java.version> </properties> <dependencies> <! - 微信 - > <dependency> <groupid> com.github.sd4324530 </groupid> <artifactid> fastweixin </artifactid> <バージョン> 1.3.15 < <GroupId> mysql </groupid> <artifactid> mysql-connector-java </artifactid> </dependency> <! - mybatis orm-> <依存関係> groupid> org.mybatis.spring.boot </groupid> <artifactid> mybatis-spring-boot-stortertid> </dependency> <dependency> groupid> org.springframework.boot </groupid> <artifactid> spring-boot-starter-aop </artifactid> </dependency> <dependency> <groupid> org.springframework.boot </groupid> <artifactid <groupid> org.springframework.boot </groupid> <artifactid> spring-boot-starter-freemarker </artifactid> </dependency> <dependency> springframework.boot </groupid> <artifactid> spring-boot-startertarter-desopentid> </artifactid> </artifactid> </artifactid> </artifactid> <groupid> org.springframework.boot </groupid> <artifactid> spring-boot-starter-websocket </artifactid> </dependency> <! - 热部署--> <dependency> <groupid> org.springframework.boot </groupid> <artifactid> spring-boot-devtools </dependency> <dependency> groupid> org.springframework.boot </groupid> <artifactid> spring-boot-starter-test </artifactid> <scope> test </scope> </dependency> </dependencies> <build> <plugins> <プラグイン> <グループ< <artifactid> spring-boot-maven-plugin </artifactid> <! - 热部署配置 - > <configuration> <fork> true </fork> </configuration> </plugin> </plugins> </build> </project>
アイデア配置
•Ctrl + Shift + A查找勾选自動的にプロジェクトを作成
•Ctrl+Shift+Alt+/查找レジストリ勾选Compiler.Automake.Allow.When.App.Running
devtools配置
默认改变 /meta-inf /maven、 /meta-inf /resources、 /resources、 /static、 /publicまたは /テンプレート等目录文件、会重新重启项目、当然我们编辑静态文件不想重启项目可以配置
spring.devtools.restart.exclude = static/**、public/**#devtools(devtoolsproperties)spring.devtools.livereload.enabled = true#compatible server.spring.devtools.livereLoad.port = 35729#サーバーport.spring.devtools.restart.additional-exclude =#full restart.spring.spring.devtools.additional-pathsをトリガーすることから除外する追加のパターン。 Restart.spring.devtools.restart.exclude = meta-inf/maven/**、meta-inf/resources/**、resources/**、static/**、public/**、templates/**、**/*test.class、**/*tests.class、git. restart.spring.devtools.restart.poll-interval = 1000#classpathの変更を投票する間に待機する時間(ミリ秒単位)spring.devtools.restart.quiet-period = 400#classpathの変更なしにクラスパスの変更なしに必要な静かな時間(ミリ秒)変更されたときに再起動チェックがトリガーされる特定のファイル。 ClassPathファイルの変更が指定されていない場合、変更は再起動をトリガーします。#remote devtools(Remotedevtoolsproperties)spring.devtools.remote.context-path =/。~~ spring-boot! support.spring.devtools.remote.debug.local-port = 8000#ローカルリモートデバッグサーバーポート.spring.devtools.devtools.remote.proxy.host =#リモートアプリケーションに接続するために使用するプロキシのホスト。 application.spring.devtools.remote.restart.enabled = true#enable remote restart.spring.devtools.remote.secret =#接続を確立するために必要な共有秘密(リモートサポートを有効にするために必要な共有秘密).spring.devtools.remote.secret-header-name = x-auth-token#htpp headerを使用する
总结
以上所述是小编给大家介绍的スプリングブート配置アイデア和devtools