台州网站建设方案,合肥网站建设价格,苏州企业网站建设开发与制作,跨境电商平台数据项目结束#xff0c;马上就要出去找工作了#xff0c;这段时间也不用写项目#xff0c;就整理了一些以后可能会用的到的配置#xff0c;还有一个原因就是我不想去记忆。。。。。。。。。SSH下application.xml的基本配置#xff0c;应该满足一般的开发需求?xml versio… 项目结束马上就要出去找工作了这段时间也不用写项目就整理了一些以后可能会用的到的配置还有一个原因就是我不想去记忆。。。。。。。。。 SSH下application.xml的基本配置应该满足一般的开发需求?xml version1.0 encodingUTF-8?
beans xmlnshttp://www.springframework.org/schema/beansxmlns:xsihttp://www.w3.org/2001/XMLSchema-instance xmlns:phttp://www.springframework.org/schema/pxmlns:aophttp://www.springframework.org/schema/aopxmlns:txhttp://www.springframework.org/schema/txxmlns:contexthttp://www.springframework.org/schema/contextxsi:schemaLocationhttp://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsdhttp://www.springframework.org/schema/contexthttp://www.springframework.org/schema/context/spring-context-3.0.xsdhttp://www.springframework.org/schema/txhttp://www.springframework.org/schema/tx/spring-tx-3.0.xsdhttp://www.springframework.org/schema/aophttp://www.springframework.org/schema/aop/spring-aop-3.0.xsd!-- 事务 --bean idtxManagerclassorg.springframework.orm.hibernate3.HibernateTransactionManagerproperty namesessionFactory refsessionFactory/property/bean!-- 链接点 --tx:advice idtxAvice transaction-managertxManagertx:attributestx:method namefind* propagationNOT_SUPPORTEDread-onlyfalse /tx:method namequery* propagationNOT_SUPPORTEDread-onlyfalse /tx:method namesave* propagationREQUIRED /tx:method nameadd* propagationREQUIRED /tx:method namedelete* propagationREQUIRED /tx:method nameupdate* propagationREQUIRED /tx:method nameremove* propagationREQUIRED /tx:method namekeep* propagationREQUIRED //tx:attributes/tx:advice!-- AOP切面 --aop:configaop:pointcutexpressionexecution(* com.hpsvse.xyz.qqzone.dao.impl.*.*(..))idmyPoint /aop:advisor advice-reftxAvice pointcut-refmyPoint //aop:configbean iddataSource classorg.apache.commons.dbcp.BasicDataSourceproperty namedriverClassName valueoracle.jdbc.driver.OracleDriver/propertyproperty nameurl valuejdbc:oracle:thin:localhost:1521:orcl/propertyproperty nameusername valueQQZone/propertyproperty namepassword valueqqzone/property/beanbean idsessionFactoryclassorg.springframework.orm.hibernate3.LocalSessionFactoryBeanproperty namedataSourceref beandataSource //propertyproperty namehibernatePropertiespropsprop keyhibernate.dialectorg.hibernate.dialect.Oracle9Dialect/prop/props/propertyproperty namemappingResourceslist!-- xml映射实体 --valuecom/hpsvse/xyz/qqzone/entity/Friendmsg.hbm.xml/valuevaluecom/hpsvse/xyz/qqzone/entity/Logact.hbm.xml/valuevaluecom/hpsvse/xyz/qqzone/entity/Users.hbm.xml/valuevaluecom/hpsvse/xyz/qqzone/entity/Message.hbm.xml/valuevaluecom/hpsvse/xyz/qqzone/entity/Marks.hbm.xml/valuevaluecom/hpsvse/xyz/qqzone/entity/Activitys.hbm.xml/valuevaluecom/hpsvse/xyz/qqzone/entity/Dic.hbm.xml/valuevaluecom/hpsvse/xyz/qqzone/entity/Say.hbm.xml/valuevaluecom/hpsvse/xyz/qqzone/entity/Fridends.hbm.xml/valuevaluecom/hpsvse/xyz/qqzone/entity/Album.hbm.xml/valuevaluecom/hpsvse/xyz/qqzone/entity/Photo.hbm.xml/valuevaluecom/hpsvse/xyz/qqzone/entity/Comments.hbm.xml/valuevaluecom/hpsvse/xyz/qqzone/entity/Pwdprotect.hbm.xml/value/list/property/bean!-- 开启注解 --context:annotation-config/context:annotation-configcontext:component-scan base-packagecom.hpsvse.xyz.qqzone.*/context:component-scan
/beans SSH下web.xml基本配置?xml version1.0 encodingUTF-8?
web-app version2.5 xmlnshttp://java.sun.com/xml/ns/javaee xmlns:xsihttp://www.w3.org/2001/XMLSchema-instance xsi:schemaLocationhttp://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsdwelcome-file-listwelcome-filelogin.jsp/welcome-file/welcome-file-list!-- opensessionview --servletservlet-nameImageAction/servlet-nameservlet-classcom.hpsvse.xyz.qqzone.web.action.ImageAction/servlet-class/servletservlet-mappingservlet-nameImageAction/servlet-nameurl-pattern/ImageAction/url-pattern/servlet-mappingfilterfilter-nameopensessionview/filter-namefilter-classorg.springframework.orm.hibernate3.support.OpenSessionInViewFilter/filter-class/filterfilter-mappingfilter-nameopensessionview/filter-nameurl-pattern/*/url-pattern/filter-mapping!-- struts过滤器 --filterfilter-namestrutsFilter/filter-namefilter-classorg.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter/filter-class/filterfilter-mappingfilter-namestrutsFilter/filter-nameurl-pattern/*/url-pattern/filter-mapping!-- 加载applicationContext.xml --context-paramparam-namecontextConfigLocation/param-nameparam-valueclasspath:applicationContext*.xml/param-value/context-param!-- 加载监听 --listenerlistener-classorg.springframework.web.context.ContextLoaderListener/listener-class/listener/web-app 转载于:https://blog.51cto.com/idlong/1687652