Skip to content

Commit 5dbce86

Browse files
committed
add maven plugin
1 parent e9025aa commit 5dbce86

2 files changed

Lines changed: 30 additions & 2 deletions

File tree

springboot-mybatis/pom.xml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<version>1.3.0.RELEASE</version>
1515
</parent>
1616
<properties>
17-
<start-class>com.us.Application</start-class>
17+
<start-class>com.us.example.Application</start-class>
1818
<mybatis.version>3.2.7</mybatis.version>
1919
<mybatis-spring.version>1.2.2</mybatis-spring.version>
2020
<maven.compiler.target>1.8</maven.compiler.target>
@@ -74,4 +74,29 @@
7474
<scope>test</scope>
7575
</dependency>
7676
</dependencies>
77+
<build>
78+
<plugins>
79+
<plugin>
80+
<groupId>org.apache.maven.plugins</groupId>
81+
<artifactId>maven-surefire-plugin</artifactId>
82+
<configuration>
83+
<skip>true</skip>
84+
</configuration>
85+
</plugin>
86+
87+
<plugin>
88+
<groupId>org.apache.maven.plugins</groupId>
89+
<artifactId>maven-shade-plugin</artifactId>
90+
<version>2.3</version>
91+
<executions>
92+
<execution>
93+
<phase>package</phase>
94+
<goals>
95+
<goal>shade</goal>
96+
</goals>
97+
</execution>
98+
</executions>
99+
</plugin>
100+
</plugins>
101+
</build>
77102
</project>

springboot-mybatis/src/main/java/com/us/example/service/Impl/UserServiceImpl.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
package com.us.example.service.Impl;
22

33

4+
import java.util.Date;
45
import java.util.Map;
56

7+
import javafx.scene.input.DataFormat;
68
import org.springframework.beans.factory.annotation.Autowired;
79
import org.springframework.scheduling.annotation.Scheduled;
810
import org.springframework.stereotype.Service;
@@ -34,8 +36,9 @@ public Object getList(Map<String, Object> map) {
3436
}
3537

3638
//每一秒调用一次 -- 用于测试
37-
@Scheduled(cron = "0/1 * * * * ?")
39+
@Scheduled(cron = "0/30 * * * * ?")
3840
public void printName() {
41+
System.out.println(new Date());
3942
System.out.println("my name is yang ");
4043
}
4144

0 commit comments

Comments
 (0)