当前位置: 首页 > news >正文

广州 骏域网站建设安卓手机app开发工具软件

广州 骏域网站建设,安卓手机app开发工具软件,推广普通话的重要意义,制作网站的工具最近由于公司项目需要#xff0c;学习了在Windows平台导出xml文件到Linux服务器上的指定目录下的方法#xff0c;#xff08;注#xff1a;这里的我的Linux是在本机上装的虚拟机#xff09;现在写下来记录一下#xff01; 1.首先是项目截图#xff1a; 2.主要是类…最近由于公司项目需要学习了在Windows平台导出xml文件到Linux服务器上的指定目录下的方法注这里的我的Linux是在本机上装的虚拟机现在写下来记录一下 1.首先是项目截图 2.主要是类 TimerAction.java package cn.gov.csrc.task.action;import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException;import org.apache.struts2.convention.annotation.Action; import org.jdom2.Document; import org.jdom2.Element; import org.jdom2.output.XMLOutputter; import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException; import org.springframework.context.annotation.Scope; import org.springframework.scheduling.quartz.QuartzJobBean; import org.springframework.stereotype.Controller;Controller() Scope(prototype) Action(TimerAction) public class TimerAction extends QuartzJobBean {private static final String path /usr/local/datasource/zip/user.xml;Overrideprotected void executeInternal(JobExecutionContext context)throws JobExecutionException {}public void start() throws FileNotFoundException, IOException{System.out.println(计划任务开始执行......);BuildXMLDoc();System.out.println(计划任务结束执行......);}public void BuildXMLDoc() throws FileNotFoundException, IOException{Element root new Element(list);Document doc new Document(root);for(int i0;i5;i){Element elements new Element(user);elements.setAttribute(id,i);elements.addContent(new Element(name).setText(迷彩风情));elements.addContent(new Element(age).setText(24));elements.addContent(new Element(sex).setText(男));root.addContent(elements);XMLOutputter outputter new XMLOutputter();outputter.output(doc, new FileOutputStream(path));}}}3.主要的配置文件 configuration-base.xml ?xml version1.0? beans xmlnshttp://www.springframework.org/schema/beansxmlns:xsihttp://www.w3.org/2001/XMLSchema-instance xmlns:aophttp://www.springframework.org/schema/aopxmlns:txhttp://www.springframework.org/schema/tx xmlns:contexthttp://www.springframework.org/schema/contextxmlns:securityhttp://www.springframework.org/schema/securityxsi:schemaLocationhttp://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsdhttp://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd!-- 分散配置 --context:property-placeholder locationclasspath:jdbc.properties/!-- 组件扫描,此处的实现原理是递归扫描所有包效率较差。开发模式写法如下。后期调优可以将具体包名全部列到下面以逗号隔开 --context:component-scan base-packagecn.gov.csrc.*/!-- 配置c3p0数据源 --bean iddataSource classcom.mchange.v2.c3p0.ComboPooledDataSourceproperty namedriverClass value${jdbc.driverclass} /property namejdbcUrl value${jdbc.url} /property nameuser value${jdbc.username} /property namepassword value${jdbc.password} /property namemaxPoolSize value${c3p0.pool.size.max} /property nameminPoolSize value${c3p0.pool.size.min} /property nameinitialPoolSize value${c3p0.pool.size.ini} /property nameacquireIncrement value${c3p0.pool.size.increment} /property namemaxIdleTime value${cpool.maxIdleTime} //bean!-- 本地回话工厂bean,spring整合hibernate的核心入口 --bean idsessionFactory classorg.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean!-- 数据源 --property namedataSource refdataSource /!-- hibernate自身属性 --property namehibernatePropertiespropsprop keyhibernate.dialect${hibernate.dialect}/propprop keyhibernate.hbm2ddl.auto${hibernate.hbm2ddl.auto}/propprop keyhibernate.show_sql${hibernate.show_sql}/propprop keyhibernate.format_sqlfalse/propprop keyhibernate.temp.use_jdbc_metadata_defaultsfalse/propprop keyhibernate.cache.use_second_level_cachetrue/prop prop keyhibernate.autoReconnecttrue/prop/props/propertyproperty namepackagesToScanlistvaluecn.gov.csrc.base.systemmanager.model/value/list/property/bean!-- hibernate事务管理器,在service层上实现事务管理,达到平台无关性 --bean idtxManager classorg.springframework.orm.hibernate3.HibernateTransactionManagerproperty namesessionFactory refsessionFactory /property nameglobalRollbackOnParticipationFailure valuefalse //bean!-- 事务通知 --tx:advice idtxAdvice transaction-managertxManagertx:attributestx:method namesave* propagationREQUIRED isolationDEFAULT/tx:method nameupdate* propagationREQUIRED isolationDEFAULT/tx:method namedelete* propagationREQUIRED isolationDEFAULT/tx:method namebatch* propagationREQUIRED isolationDEFAULT/tx:method nameload* propagationREQUIRED isolationDEFAULT read-onlytrue/tx:method nameget* propagationREQUIRED isolationDEFAULT read-onlytrue/tx:method namefind* propagationREQUIRED isolationDEFAULT read-onlytrue/tx:method name* propagationREQUIRED isolationDEFAULT//tx:attributes/tx:advice!-- 任务计划 --!-- 要调用的工作 --bean idtimerAction classcn.gov.csrc.task.action.TimerAction/bean!-- 定义调用对象和调用对象的方法 --bean idtimerTask classorg.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean!-- 调用的类 --property nametargetObjectref beantimerAction//property!-- 调用类中的方法 --property nametargetMethodvaluestart/value/property!-- 作业不并发调度 --property nameconcurrent valuefalse//bean!-- 定义导出数据到xml的触发时间 --bean iddoTime classorg.springframework.scheduling.quartz.CronTriggerBeanproperty namejobDetailref beantimerTask//property!-- cron表达式 --property namecronExpressionvalue0 35 10 * * ?/value/property/bean!-- 总管理类,如果将lazy-initfalse那么容器启动就会执行调度程序 --bean idstartQuertz lazy-initfalse autowireno classorg.springframework.scheduling.quartz.SchedulerFactoryBeanproperty nametriggerslistref beandoTime//list/property/bean/beans 4.最后附上源码地址下载请点击这里 下载地址
http://www.yutouwan.com/news/108041/

相关文章:

  • 网站keywords标签怎么写网站建设图文片
  • 做网站有什么好的推荐网站链接维护怎么做
  • 万州网站建设果园路互联网行业都有哪些工作赚钱
  • 鞍山网站网站建设泽州网站设计
  • 学校响应式网站模板下载建设工程信息查询哪个网站好
  • 驾校网站制作重庆企业站seo
  • 首选大型网站建站公司广州营销课程培训班
  • 公司网站建设请示西安平面设计公司排行
  • 做电影网站要买什么淘客做自己的网站
  • 央企网站开发大鹏新区住房和建设局网站
  • 企业网站推广方式和策略雄安新区网站建设公司
  • 公司网站建设的签订合同注册网站的免费网址是什么
  • 教做粥的网站少儿编程加盟培宝未来
  • 南京专业做网站的公司哪家好做网站学完html
  • 建设一个营销网站有哪些步骤苏州网页设计多少钱
  • 临桂住房和城乡建设局网站做搜索网站挣钱
  • 物联网技术有哪些网站优化定做
  • 深圳网站公司建设方案百度手机助手官网下载
  • 营销网站的优势是什么企业名录搜索软件有哪些
  • 网站建设吧旺道网站优化
  • 网站策划书包括哪些内容长沙网络推广平台
  • 网站数据怎么备份道滘镇网站建设公司
  • 营销型网站建设策划案760关键词排名查询
  • asp.net 跳转别的网站上海抖音推广公司
  • 网站开发公司起名大淘客网站怎么做
  • 襄阳作风建设年网站做企业门户网站
  • 如何借用别人静态网站做模板智能家居产品设计案例
  • 河南网站建设企业网站前端设计是什么
  • 网站建设首先要学会什么asp.net网站项目建设
  • 合肥高端网站建设工作室专业制作网站公司哪家好