Skip to content

Commit ec43de5

Browse files
committed
Order w serwisie
1 parent faac9c7 commit ec43de5

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* Copyright 2014-11-20 the original author or authors.
3+
*/
4+
5+
package pl.altkom.spring.capgemini.web.ws;
6+
7+
/**
8+
*
9+
* @author Adrian Lapierre <[email protected]>
10+
*/
11+
public class RaportServiceImpl {
12+
13+
public void sendReport() {
14+
System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
15+
16+
}
17+
18+
}

spring-capgemini-web/src/main/resources/spring-capgemini-web-core.xml

+16-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
xmlns:context="http://www.springframework.org/schema/context"
1212
xmlns:ehcache="http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring"
1313
xmlns:jpa="http://www.springframework.org/schema/data/jpa"
14+
xmlns:task="http://www.springframework.org/schema/task"
15+
1416
xsi:schemaLocation="
1517
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
1618
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd
@@ -22,8 +24,20 @@
2224
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
2325
http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring/ehcache-spring-1.1.xsd
2426
http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.3.xsd
25-
">
26-
27+
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd
28+
">
29+
30+
31+
<task:scheduler id="scheduler" pool-size="10"/>
32+
33+
<task:scheduled-tasks scheduler="scheduler">
34+
<task:scheduled ref="reportService" method="sendReport" cron="0/10 * * * * *"/>
35+
</task:scheduled-tasks>
36+
37+
<bean id="reportService" class="pl.altkom.spring.capgemini.web.ws.RaportServiceImpl">
38+
39+
</bean>
40+
2741
<!-- Placeholder config -->
2842
<context:property-placeholder location="classpath:system.properties" />
2943
<context:component-scan base-package="pl.altkom.spring.spring.capgemini.core.service"/>

0 commit comments

Comments
 (0)