Project Description: synchronize data between platforms: 1: Spring applicationContext. the xml configuration file is as follows (only the timer configuration is described): <bean id = "jobtask" class = "org. springframework. scheduling. quartz. methodInvokingJobDetailFactoryBean "> <! -- Name of the called class action --> <property name = "targetObject"> <ref bean = "synchroDataAction"/> </property> <! -- Call methods in the class: execute method in action --> <property name = "targetMethod"> <value> execute </value> </property> </bean> <! -- Trigger --> <bean id = "cronTrigger" class = "org. springframework. scheduling. quartz. CronTriggerBean"> <! -- Point to our task --> <property name = "jobDetail" ref = "jobtask"/> <! -- Run at every Monday morning --> <! -- <Property name = "cronExpression" value = "0 0 1? * MON "/> --> <! -- Run the test once in five seconds --> <! -- <Property name = "cronExpression" value = "*/50 ****? "/> --> <Property name =" cronExpression "value =" 0 0 */1 **? "/> </Bean> <! -- Scheduler --> <bean class = "org. springframework. scheduling. quartz. SchedulerFactoryBean" autowire = "no"> <property name = "triggers"> <list> <! -- Trigger list --> <ref bean = "cronTrigger"/> </list> </property> </bean> 2: The action layer calls the Service layer method synchroDataService. synchrodata (); 3: service layer: InputStream inputStream = null; OutputStream fos = null; try {SimpleDateFormat sdformat = new SimpleDateFormat ("yyyy-MM-dd HH: mm: ss "); // inputStream = new FileInputStream (this. getClass (). getClassLoader (). getResource ("webData. properties "). getPath (); inputStream = This. getClass (). getClassLoader (). getResourceAsStream ("webData. properties "); Properties properties = new Properties (); properties. load (inputStream); String updateID = new String (properties. getProperty ("updateID "). getBytes ("ISO8859_1"), "UTF-8"); String registerID = new String (properties. getProperty ("registerID "). getBytes ("ISO8859_1"), "UTF-8"); if (inputStream! = Null) {inputStream. close ();} String code_update [] = {"SYS302001", "SYS302003"}; String code_register [] = {"SYS302005", "SYS302006 "}; fos = new FileOutputStream (this. getClass (). getClassLoader (). getResource ("webData. properties "). getPath (); if (StringUtils. isNotEmpty (updateID) {List <PlatformUser> listU = getListData (code_update, updateID, sdformat); dataInsert (listU, sdformat); properties. setP Roperty ("updateID", MaxID);} if (StringUtils. isNotEmpty (registerID) {List <PlatformUser> listR = getListData (code_register, registerID, sdformat); dataInsert (listR, sdformat); properties. setProperty ("registerID", MaxID);} properties. store (fos, null);} finally {if (fos! = Null) {fos. flush (); fos. close ();}}