前言大纲:
视频第一讲:(配套博客CSDN)
css:存放css样式表images:存放图片js:存放系统前台框架jsuserdefinejs:存放自定义js文件resources.jsp: 引入相关 css 、 js 文件
<beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"xmlns:context="http://www.springframework.org/schema/context"xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:oxm="http://www.springframework.org/schema/oxm"xmlns:cache="http://www.springframework.org/schema/cache" xmlns:tx="http://www.springframework.org/schema/tx"xmlns:ehcache="http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring"xmlns:aop="http://www.springframework.org/schema/aop"xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans-4.0.xsdhttp://www.springframework.org/schema/contexthttp://www.springframework.org/schema/context/spring-context-4.0.xsdhttp://www.springframework.org/schema/mvchttp://www.springframework.org/schema/mvc/spring-mvc-4.0.xsdhttp://www.springframework.org/schema/cachehttp://www.springframework.org/schema/cache/spring-cache.xsdhttp://www.springframework.org/schema/txhttp://www.springframework.org/schema/tx/spring-tx-4.0.xsdhttp://www.springframework.org/schema/aophttp://www.springframework.org/schema/aop/spring-aop-4.0.xsdhttp://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-springhttp://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring/ehcache-spring-1.2.xsd"><context:annotation-config /><context:component-scan base-package="com.xxx"><context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/>context:component-scan><aop:aspectj-autoproxy/><bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"><property name="locations"><list><value>classpath:jdbc.propertiesvalue><value>classpath:sysconfig.propertiesvalue>list>property>bean><bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"><property name="driverClassName" value="${jdbc.driverClassName}" /><property name="url" value="${jdbc.url}" /><property name="username" value="${jdbc.username}" /><property name="password" value="${jdbc.password}" /><property name="initialSize" value="${jdbc.initialSize}" /><property name="maxActive" value="${jdbc.maxActive}" /><property name="maxIdle" value="${jdbc.maxIdle}" /><property name="maxWait" value="${jdbc.maxWait}" />bean><bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager"p:cacheManager-ref="ehcache"/><bean id="ehcache" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"p:configLocation="classpath:ehcache.xml" p:shared="true"/><bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"><property name="dataSource" ref="dataSource"/><property name="configLocation" value="classpath:mybatis.xml"/><property name="typeAliasesPackage" value="com.xxx.ssm.model">property>bean><bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"><property name="dataSource" ref="dataSource" />bean><tx:advice id="txAdvice" transaction-manager="transactionManager"><tx:attributes ><tx:method name="*" propagation="REQUIRED" read-only="false" rollback-for="Throwable" /><tx:method name="load*" propagation="SUPPORTS" read-only="true"/><tx:method name="find*" propagation="SUPPORTS" read-only="true"/><tx:method name="search*" propagation="SUPPORTS" read-only="true"/><tx:method name="query*" propagation="SUPPORTS" read-only="true"/><tx:method name="select*" propagation="SUPPORTS" read-only="true"/><tx:method name="get*" propagation="SUPPORTS" read-only="true"/>tx:attributes>tx:advice><aop:config expose-proxy="true"><aop:pointcut id="transactionPointCut"expression="execution(* com.xxx.*.service..*.*(..))" /><aop:advisor pointcut-ref="transactionPointCut"advice-ref="txAdvice" order="1" />aop:config><bean id="sessionTemplate" class="org.mybatis.spring.SqlSessionTemplate" scope=""><constructor-arg index="0" ref="sqlSessionFactory" />bean><bean class="org.mybatis.spring.mapper.MapperScannerConfigurer"><property name="basePackage" value="com.xxx.ssm.dao.*" /><property name="sqlSessionTemplateBeanName" value="sessionTemplate">property>bean>beans>
------------------------------------------------------------------------------------------------xml version="1.0" encoding="UTF-8" ?>
<beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"xmlns:context="http://www.springframework.org/schema/context"xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:oxm="http://www.springframework.org/schema/oxm"xmlns:cache="http://www.springframework.org/schema/cache" xmlns:tx="http://www.springframework.org/schema/tx"xmlns:aop="http://www.springframework.org/schema/aop"xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans-4.0.xsdhttp://www.springframework.org/schema/contexthttp://www.springframework.org/schema/context/spring-context-4.0.xsdhttp://www.springframework.org/schema/mvchttp://www.springframework.org/schema/mvc/spring-mvc-4.0.xsdhttp://www.springframework.org/schema/cachehttp://www.springframework.org/schema/cache/spring-cache.xsdhttp://www.springframework.org/schema/txhttp://www.springframework.org/schema/tx/spring-tx-4.0.xsdhttp://www.springframework.org/schema/aophttp://www.springframework.org/schema/aop/spring-aop-4.0.xsd">beans>
--------------------------------------------------------------------------------------------------3.3/ beans-security.xml--------------------------------------------------------------------------------------------------暂时不做这块--------------------------------------------------------------------------------------------------3.4/ ehcache.xml--------------------------------------------------------------------------------------------------xml version="1.0" encoding="UTF-8" ?>
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd" updateCheck="false"><diskStore path="java.io.tmpdir"/><defaultCache name="org.taha.cache.METHOD_CACHE"eternal="false"maxElementsInMemory="10000"overflowToDisk="false"diskPersistent="false"timeToIdleSeconds="0"timeToLiveSeconds="600"memoryStoreEvictionPolicy="LRU" />ehcache>
-----------------------------------------------------------------------------------------------------------------------------------------3.5/ jdbc.properties--------------------------------------------------------------------------------------------------------------------------------------#jdbc.driverClassName=oracle.jdbc.driver.OracleDriver
#jdbc.url=jdbc:oracle:thin:@localhost:1521:ORCL#jdbc.username=cms#jdbc.password=123456#jdbc.Driver=oracle.jdbc.driver.OracleDriver#connection pool Max count#dbc.maxActive=10#Waiting for the connection Max count#jdbc.maxIdle=0#jdbc.initialSize=5#jdbc.maxWait=1000jdbc.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriverjdbc.url=jdbc\:sqlserver\://localhost\:1433;DatabaseName=ssmjdbc.username=sajdbc.password=123456jdbc.Driver=com.microsoft.sqlserver.jdbc.SQLServerDriver#connection pool Max countjdbc.maxActive=10#Waiting for the connection Max countjdbc.maxIdle=0jdbc.initialSize=5jdbc.maxWait=1000jdbc.type=orcale
--------------------------------------------------------------------------------------------------3.6/ log4j.properties
-------------------------------------------------------------------------------------------------
#
# Log4J Settings for log4j 1.2.x (via jakarta-commons-logging)## The five logging levels used by Log are (in order):## 1. DEBUG (the least serious)# 2. INFO# 3. WARN# 4. ERROR# 5. FATAL (the most serious)# Set root logger level to ERROR and append to stdoutlog4j.rootLogger=all, stdout, Platform, db, FILElog4j.appender.stdout=org.apache.log4j.ConsoleAppenderlog4j.appender.stdout.layout=org.apache.log4j.PatternLayout# Pattern to output the caller's file name and line number.log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %5p [%t](%c:%L) %x- %m%n# Print only messages of level ERROR or above in the package noModule.log4j.logger.noModule=ERRORlog4j.logger.org.apache.log4j=ERROR# OpenSymphony Stufflog4j.logger.com.opensymphony=ERROR# Spring Stufflog4j.logger.org.springframework=INFOlog4j.logger.org.hibernate=WARNlog4j.appender.FILE=org.apache.log4j.DailyRollingFileAppenderlog4j.appender.FILE.File=${catalina.home}/logs/ALESP/ALESP_sys_runtime_log.loglog4j.appender.FILE.DatePattern='.'yyyy-MM-ddlog4j.appender.FILE.layout=org.apache.log4j.PatternLayoutlog4j.appender.FILE.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %5p [%t](%c:%L) %x- %m%n
-------------------------------------------------------------------------------------------------