Skip to content

Commit

Permalink
怎样实现springboot+scala的热加载
Browse files Browse the repository at this point in the history
  • Loading branch information
之剑 committed Aug 25, 2016
1 parent b80ce27 commit bc86c4f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
24 changes: 16 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<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/maven-v4_0_0.xsd">
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.springboot.in.action</groupId>
<artifactId>lightsword</artifactId>
Expand Down Expand Up @@ -123,12 +124,17 @@
</execution>
</executions>
<configuration>
<recompileMode>incremental</recompileMode>
<scalaVersion>${scala.version}</scalaVersion>
<launchers>
<launcher>
<id>app</id>
<mainClass>com.springboot.in.action.LightSwordApplication</mainClass>
<args>
<arg>-deprecation</arg>
</args>
<jvmArgs>
<jvmArg>-Xms64m</jvmArg>
<jvmArg>-Xmx1024m</jvmArg>
</jvmArgs>
</launcher>
Expand All @@ -138,13 +144,15 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
<dependencies>
<!-- spring热部署-->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>springloaded</artifactId>
<version>1.2.6.RELEASE</version>
</dependency>
</dependencies>

</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
3 changes: 2 additions & 1 deletion run.sh
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
mvn clean scala:compile scala:run -Dlauncher=app
#!/usr/bin/env bash
mvn clean scala:compile scala:run -Dlauncher=app

0 comments on commit bc86c4f

Please sign in to comment.