Ich schreibe einen Job, um etwas aufzuzeichnen verwenden @ Geplant, so füge ich Aufgabe: Annotation-getrieben in applicationContext.xml.Frühjahr Aufgabe: Annotation-driven make jung gc häufig
ActivityCacheJob.java:
@Component
public class ActivityCacheJob {
@Scheduled(cron = "0 * * * * ?")
public void getActivityCacheStatus() {
//dosomething
}
}
applicationContext.xml:
<task:annotation-driven />
Nach der Bereitstellung, ich jung gc Zeit Anstieg von 3 bis 15 pro Minute finden.
Dann entferne ich Job, aber noch Aufgabe hinzufügen: annotation-driven in applicationContext.xml.Dieses Problem besteht immer noch.
ActivityCacheJob.java:
//@Component
public class ActivityCacheJob {
//@Scheduled(cron = "0 * * * * ?")
public void getActivityCacheStatus() {
//dosomething
}
}
applicationContext.xml:
<task:annotation-driven />
Also, ich entfernen Aufgabe: Annotations-getriebene, Verwendung xml, dieses Problem tritt nicht beendet.
applicationContext.xml:
<task:scheduled-tasks>
<task:scheduled ref="activityCacheJob" method="getActivityCacheStatus" cron="0 * * * * ?"/>
</task:scheduled-tasks>
Feder Version: 3.1.1.RELEASE
Meine Frage ist, warum Aufgabe: annotation-driven junge gc Anstieg bis machen?