maven 配置
<? xml version = "1.0" การเข้ารหัส = "utf-8"?> <project xmlns = "http://maven.apache.org/pom/4.0.0" xmlns: xsi = "http://www.w3.org/2001/ XSI: schemalocation = "http://maven.apache.org/pom/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" <ArtIfactId> BAR-WEB </artIfactId> <persion> 0.0.1-Snapshot </เวอร์ชัน> <packaging> jar </packaging> <name> bar-web </name> <คำอธิบาย> โครงการบาร์สำหรับการบูตฤดูใบไม้ผลิ </คำอธิบาย> <Sersion> 1.5.6.Release </เวอร์ชัน> <inelypath/> <!-การค้นหาผู้ปกครองจากที่เก็บ-> </parent> <properties> <project.build.sourceencoding> utf-8 </project.build.sourceencoding> <java.version> 1.8 </java.version> </premerties> <pendencies> <!-微信-> <การพึ่งพา> <roupId> com.github.sd4324530 </groupid> <RoupID> mySQL </groupID> <ArtIfactId> mysql-connector-java </artifactid> </การพึ่งพา> <!-mybatis orm-> <cendency> <roupid> org.mybatis.spring.boot </groupid> </permentency> <predency> <roupId> org.springframework.boot </groupId> <ratifactid> Spring-Boot-Starter-Aop </artifactid> </derncy> <การพึ่งพา <RoupID> org.springframework.boot </groupId> <ratifactid> Spring-Boot-Starter-FreeMarker </artifactid> </การพึ่งพาอาศัย> <การพึ่งพาอาศัย> <roupid> org.springframework.boot </groupid> <RoupID> org.springframework.boot </groupId> <ratifactid> Spring-Boot-Starter-Websocket </artifactid> </serpendency> <!-热部署-> <การพึ่งพา </perctency> <predency> <roupId> org.springframework.boot </groupid> <ratifactid> การทดสอบสปริง-สตาร์เทสต์ </artifactid> <pope> ทดสอบ </cope> <ArtIfactId> Spring-Boot-Maven-Plugin </artifactId> <!-热部署配置-> <การกำหนดค่า> <Fork> True </fork> </การกำหนดค่า> </plugin>
ความคิด配置
• Ctrl + Shift + A 查找ทำโครงการโดยอัตโนมัติ选项
• ctrl+shift+alt+/ 查找 registry 勾选 Compiler.Automake.allow.when.app.running 选项
Devtools 配置
默认改变 /meta-inf /maven, /meta-inf /ทรัพยากร, /ทรัพยากร, /คงที่, /สาธารณะหรือ /แม่แบบ等目录文件, 会重新重启项目, 当然我们编辑静态文件不想重启项目可以配置当然我们编辑静态文件不想重启项目可以配置当然我们编辑静态文件不想重启项目可以配置
Spring.devtools.restart.exclude = Static/**, สาธารณะ/** # devtools (devtoolsproperties) spring.devtools.livereload.enabled = true # enable alivereload.com server.spring.devtools.livereload. รูปแบบเพิ่มเติมที่ควรแยกออกจากการเรียกใช้การรีสตาร์ทแบบเต็ม. spring.devtools.restart.additional-paths = # พา ธ เพิ่มเติมเพื่อดูการเปลี่ยนแปลง รีสตาร์ท. spring.devtools.restart.exclude = meta-inf/maven/**, meta-inf/resources/**, ทรัพยากร/**, คงที่/**, สาธารณะ/**, แม่แบบ/**, **/*test.class, **/*tests.class, git.properties retart.spring.devtools.restart.poll-interval = 1000 # ระยะเวลา (ในมิลลิวินาที) รอระหว่างการสำรวจการเปลี่ยนแปลง classpath.spring.devtools.restart.quiet-period = 400 # เวลาที่เงียบสงบ (ใน milliseconds) ไฟล์เฉพาะที่เมื่อมีการเปลี่ยนแปลงจะทริกเกอร์การตรวจสอบรีสตาร์ท หากไม่ได้ระบุการเปลี่ยนแปลงไฟล์ classpath ใด ๆ จะทริกเกอร์รีสตาร์ท # ระยะไกล devtools (remotedevtoolsproperties) spring.devtools.remote.context-path =/. ~~ spring-boot! ~ # เส้นทางบริบทที่ใช้ในการจัดการการเชื่อมต่อระยะไกล support.spring.devtools.remote.debug.local-port = 8000 # พอร์ตเซิร์ฟเวอร์ดีบักระยะไกลในท้องถิ่น. spring.devtools.remote.proxy.host = # โฮสต์ของพร็อกซีเพื่อใช้ในการเชื่อมต่อกับพอร์ต application.spring.devtools.remote.restart.enabled = true # เปิดใช้งานรีโมทรีสตาร์ท. spring.devtools.remote.secret = # ความลับที่ใช้ร่วมกันที่จำเป็นในการสร้างการเชื่อมต่อ (จำเป็นต้องเปิดใช้งานการสนับสนุนระยะไกล)
总结
以上所述是小编给大家介绍的สปริงบูต配置ความคิด和 Devtools 热部署的方法, 希望对大家有所帮助,, 如果大家, 小编会及时回复大家的! 小编会及时回复大家的! 小编会及时回复大家的!