Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
springBoot
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
WitCloud
springBoot
Commits
5dbce86a
Commit
5dbce86a
authored
Mar 22, 2017
by
杨伊博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add maven plugin
parent
e9025aa5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
2 deletions
+30
-2
pom.xml
springboot-mybatis/pom.xml
+26
-1
UserServiceImpl.java
...ain/java/com/us/example/service/Impl/UserServiceImpl.java
+4
-1
No files found.
springboot-mybatis/pom.xml
View file @
5dbce86a
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
<version>
1.3.0.RELEASE
</version>
<version>
1.3.0.RELEASE
</version>
</parent>
</parent>
<properties>
<properties>
<start-class>
com.us.Application
</start-class>
<start-class>
com.us.
example.
Application
</start-class>
<mybatis.version>
3.2.7
</mybatis.version>
<mybatis.version>
3.2.7
</mybatis.version>
<mybatis-spring.version>
1.2.2
</mybatis-spring.version>
<mybatis-spring.version>
1.2.2
</mybatis-spring.version>
<maven.compiler.target>
1.8
</maven.compiler.target>
<maven.compiler.target>
1.8
</maven.compiler.target>
...
@@ -74,4 +74,29 @@
...
@@ -74,4 +74,29 @@
<scope>
test
</scope>
<scope>
test
</scope>
</dependency>
</dependency>
</dependencies>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-surefire-plugin
</artifactId>
<configuration>
<skip>
true
</skip>
</configuration>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-shade-plugin
</artifactId>
<version>
2.3
</version>
<executions>
<execution>
<phase>
package
</phase>
<goals>
<goal>
shade
</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
</project>
\ No newline at end of file
springboot-mybatis/src/main/java/com/us/example/service/Impl/UserServiceImpl.java
View file @
5dbce86a
package
com
.
us
.
example
.
service
.
Impl
;
package
com
.
us
.
example
.
service
.
Impl
;
import
java.util.Date
;
import
java.util.Map
;
import
java.util.Map
;
import
javafx.scene.input.DataFormat
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -34,8 +36,9 @@ public class UserServiceImpl implements UserService {
...
@@ -34,8 +36,9 @@ public class UserServiceImpl implements UserService {
}
}
//每一秒调用一次 -- 用于测试
//每一秒调用一次 -- 用于测试
@Scheduled
(
cron
=
"0/
1 * *
* * ?"
)
@Scheduled
(
cron
=
"0/
30 * *
* * ?"
)
public
void
printName
()
{
public
void
printName
()
{
System
.
out
.
println
(
new
Date
());
System
.
out
.
println
(
"my name is yang "
);
System
.
out
.
println
(
"my name is yang "
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment