init
This commit is contained in:
2715
web/WEB-INF/6220project.cld
Normal file
2715
web/WEB-INF/6220project.cld
Normal file
File diff suppressed because it is too large
Load Diff
BIN
web/WEB-INF/lib/antlr-2.7.7.jar
Normal file
BIN
web/WEB-INF/lib/antlr-2.7.7.jar
Normal file
Binary file not shown.
BIN
web/WEB-INF/lib/cglib-2.2.jar
Normal file
BIN
web/WEB-INF/lib/cglib-2.2.jar
Normal file
Binary file not shown.
BIN
web/WEB-INF/lib/cglib-nodep-2.2.jar
Normal file
BIN
web/WEB-INF/lib/cglib-nodep-2.2.jar
Normal file
Binary file not shown.
BIN
web/WEB-INF/lib/classmate-1.3.0.jar
Normal file
BIN
web/WEB-INF/lib/classmate-1.3.0.jar
Normal file
Binary file not shown.
BIN
web/WEB-INF/lib/com.springsource.org.aopalliance-1.0.0.jar
Normal file
BIN
web/WEB-INF/lib/com.springsource.org.aopalliance-1.0.0.jar
Normal file
Binary file not shown.
BIN
web/WEB-INF/lib/com.springsource.org.apache.axis-1.4.0.jar
Normal file
BIN
web/WEB-INF/lib/com.springsource.org.apache.axis-1.4.0.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
web/WEB-INF/lib/com.springsource.org.apache.commons.io-1.4.0.jar
Normal file
BIN
web/WEB-INF/lib/com.springsource.org.apache.commons.io-1.4.0.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
web/WEB-INF/lib/com.springsource.org.apache.log4j-1.2.15.jar
Normal file
BIN
web/WEB-INF/lib/com.springsource.org.apache.log4j-1.2.15.jar
Normal file
Binary file not shown.
Binary file not shown.
BIN
web/WEB-INF/lib/dom4j-1.6.1.jar
Normal file
BIN
web/WEB-INF/lib/dom4j-1.6.1.jar
Normal file
Binary file not shown.
BIN
web/WEB-INF/lib/hibernate-commons-annotations-5.0.2.Final.jar
Normal file
BIN
web/WEB-INF/lib/hibernate-commons-annotations-5.0.2.Final.jar
Normal file
Binary file not shown.
BIN
web/WEB-INF/lib/hibernate-core-5.3.0.CR1.jar
Normal file
BIN
web/WEB-INF/lib/hibernate-core-5.3.0.CR1.jar
Normal file
Binary file not shown.
BIN
web/WEB-INF/lib/jandex-2.0.3.Final.jar
Normal file
BIN
web/WEB-INF/lib/jandex-2.0.3.Final.jar
Normal file
Binary file not shown.
BIN
web/WEB-INF/lib/javassist-3.22.0-GA.jar
Normal file
BIN
web/WEB-INF/lib/javassist-3.22.0-GA.jar
Normal file
Binary file not shown.
BIN
web/WEB-INF/lib/javax.persistence-api-2.2.jar
Normal file
BIN
web/WEB-INF/lib/javax.persistence-api-2.2.jar
Normal file
Binary file not shown.
BIN
web/WEB-INF/lib/jboss-logging-3.3.1.Final.jar
Normal file
BIN
web/WEB-INF/lib/jboss-logging-3.3.1.Final.jar
Normal file
Binary file not shown.
BIN
web/WEB-INF/lib/jboss-transaction-api_1.2_spec-1.0.1.Final.jar
Normal file
BIN
web/WEB-INF/lib/jboss-transaction-api_1.2_spec-1.0.1.Final.jar
Normal file
Binary file not shown.
BIN
web/WEB-INF/lib/jstl.jar
Normal file
BIN
web/WEB-INF/lib/jstl.jar
Normal file
Binary file not shown.
BIN
web/WEB-INF/lib/mysql-connector-java-5.0.8.jar
Normal file
BIN
web/WEB-INF/lib/mysql-connector-java-5.0.8.jar
Normal file
Binary file not shown.
BIN
web/WEB-INF/lib/spring-aop-4.3.0.RELEASE.jar
Normal file
BIN
web/WEB-INF/lib/spring-aop-4.3.0.RELEASE.jar
Normal file
Binary file not shown.
BIN
web/WEB-INF/lib/spring-aspects-4.3.0.RELEASE.jar
Normal file
BIN
web/WEB-INF/lib/spring-aspects-4.3.0.RELEASE.jar
Normal file
Binary file not shown.
BIN
web/WEB-INF/lib/spring-beans-4.3.0.RELEASE.jar
Normal file
BIN
web/WEB-INF/lib/spring-beans-4.3.0.RELEASE.jar
Normal file
Binary file not shown.
BIN
web/WEB-INF/lib/spring-context-4.3.0.RELEASE.jar
Normal file
BIN
web/WEB-INF/lib/spring-context-4.3.0.RELEASE.jar
Normal file
Binary file not shown.
BIN
web/WEB-INF/lib/spring-context-support-4.3.0.RELEASE.jar
Normal file
BIN
web/WEB-INF/lib/spring-context-support-4.3.0.RELEASE.jar
Normal file
Binary file not shown.
BIN
web/WEB-INF/lib/spring-core-4.3.0.RELEASE.jar
Normal file
BIN
web/WEB-INF/lib/spring-core-4.3.0.RELEASE.jar
Normal file
Binary file not shown.
BIN
web/WEB-INF/lib/spring-expression-4.3.0.RELEASE.jar
Normal file
BIN
web/WEB-INF/lib/spring-expression-4.3.0.RELEASE.jar
Normal file
Binary file not shown.
BIN
web/WEB-INF/lib/spring-instrument-4.3.0.RELEASE.jar
Normal file
BIN
web/WEB-INF/lib/spring-instrument-4.3.0.RELEASE.jar
Normal file
Binary file not shown.
BIN
web/WEB-INF/lib/spring-instrument-tomcat-4.3.0.RELEASE.jar
Normal file
BIN
web/WEB-INF/lib/spring-instrument-tomcat-4.3.0.RELEASE.jar
Normal file
Binary file not shown.
BIN
web/WEB-INF/lib/spring-jdbc-4.3.0.RELEASE.jar
Normal file
BIN
web/WEB-INF/lib/spring-jdbc-4.3.0.RELEASE.jar
Normal file
Binary file not shown.
BIN
web/WEB-INF/lib/spring-jms-4.3.0.RELEASE.jar
Normal file
BIN
web/WEB-INF/lib/spring-jms-4.3.0.RELEASE.jar
Normal file
Binary file not shown.
BIN
web/WEB-INF/lib/spring-messaging-4.3.0.RELEASE.jar
Normal file
BIN
web/WEB-INF/lib/spring-messaging-4.3.0.RELEASE.jar
Normal file
Binary file not shown.
BIN
web/WEB-INF/lib/spring-orm-4.3.0.RELEASE.jar
Normal file
BIN
web/WEB-INF/lib/spring-orm-4.3.0.RELEASE.jar
Normal file
Binary file not shown.
BIN
web/WEB-INF/lib/spring-oxm-4.3.0.RELEASE.jar
Normal file
BIN
web/WEB-INF/lib/spring-oxm-4.3.0.RELEASE.jar
Normal file
Binary file not shown.
BIN
web/WEB-INF/lib/spring-test-4.3.0.RELEASE.jar
Normal file
BIN
web/WEB-INF/lib/spring-test-4.3.0.RELEASE.jar
Normal file
Binary file not shown.
BIN
web/WEB-INF/lib/spring-tx-4.3.0.RELEASE.jar
Normal file
BIN
web/WEB-INF/lib/spring-tx-4.3.0.RELEASE.jar
Normal file
Binary file not shown.
BIN
web/WEB-INF/lib/spring-web-4.3.0.RELEASE.jar
Normal file
BIN
web/WEB-INF/lib/spring-web-4.3.0.RELEASE.jar
Normal file
Binary file not shown.
BIN
web/WEB-INF/lib/spring-webmvc-4.3.0.RELEASE.jar
Normal file
BIN
web/WEB-INF/lib/spring-webmvc-4.3.0.RELEASE.jar
Normal file
Binary file not shown.
BIN
web/WEB-INF/lib/spring-webmvc-portlet-4.3.0.RELEASE.jar
Normal file
BIN
web/WEB-INF/lib/spring-webmvc-portlet-4.3.0.RELEASE.jar
Normal file
Binary file not shown.
BIN
web/WEB-INF/lib/spring-websocket-4.3.0.RELEASE.jar
Normal file
BIN
web/WEB-INF/lib/spring-websocket-4.3.0.RELEASE.jar
Normal file
Binary file not shown.
BIN
web/WEB-INF/lib/standard.jar
Normal file
BIN
web/WEB-INF/lib/standard.jar
Normal file
Binary file not shown.
54
web/WEB-INF/spring.xml
Normal file
54
web/WEB-INF/spring.xml
Normal file
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:security="http://www.springframework.org/schema/security"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
|
||||
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
|
||||
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.2.xsd">
|
||||
|
||||
<!-- 自动扫描所有注解(除Controller) 注册为bean (启动注解) -->
|
||||
<context:component-scan base-package="com.eshop">
|
||||
<context:exclude-filter type="annotation"
|
||||
expression="org.springframework.stereotype.Controller" />
|
||||
</context:component-scan>
|
||||
|
||||
<!--配置数据源 -->
|
||||
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
|
||||
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
|
||||
<property name="url"
|
||||
value="jdbc:mysql://127.0.0.1:3306/eshop?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&autoReconnectForPools=true" />
|
||||
<property name="username" value="root" />
|
||||
<property name="password" value="GaoDi0906" />
|
||||
<!-- <property name="password" value="GaoDi0906" /> -->
|
||||
<property name="maxActive" value="255" />
|
||||
<property name="maxIdle" value="20" />
|
||||
<property name="maxWait" value="10000" />
|
||||
</bean>
|
||||
|
||||
<!--配置session工厂 -->
|
||||
<bean id="sessionFactory"
|
||||
class="org.springframework.orm.hibernate5.LocalSessionFactoryBean">
|
||||
<property name="dataSource" ref="dataSource" />
|
||||
<property name="packagesToScan" value="com.eshop.entity" />
|
||||
<property name="hibernateProperties">
|
||||
<props>
|
||||
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
|
||||
<prop key="hibernate.show_sql">false</prop>
|
||||
<prop key="hibernate.format_sql">false</prop>
|
||||
</props>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- 事务管理器配置 -->
|
||||
<bean id="transactionManager"
|
||||
class="org.springframework.orm.hibernate5.HibernateTransactionManager">
|
||||
<property name="sessionFactory" ref="sessionFactory" />
|
||||
</bean>
|
||||
|
||||
<!-- 启动事务注解 -->
|
||||
<tx:annotation-driven transaction-manager="transactionManager"
|
||||
proxy-target-class="true" />
|
||||
|
||||
</beans>
|
37
web/WEB-INF/springMVC.xml
Normal file
37
web/WEB-INF/springMVC.xml
Normal file
@@ -0,0 +1,37 @@
|
||||
<?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:context="http://www.springframework.org/schema/context"
|
||||
xmlns:mvc="http://www.springframework.org/schema/mvc"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
|
||||
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd">
|
||||
|
||||
<!-- 静态资源访问 -->
|
||||
<mvc:default-servlet-handler/>
|
||||
|
||||
<mvc:annotation-driven/>
|
||||
|
||||
<!-- 把标记了@Controller注解的类转换为bean -->
|
||||
<context:component-scan base-package="com.eshop.controller">
|
||||
</context:component-scan>
|
||||
|
||||
<!-- ViewResolver Servlet、JSP视图解析-->
|
||||
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
|
||||
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
|
||||
<property name="prefix" value="/"/>
|
||||
<property name="suffix" value=".jsp"/>
|
||||
</bean>
|
||||
|
||||
<!-- 配置拦截器 -->
|
||||
<!--
|
||||
<mvc:interceptors>
|
||||
<mvc:interceptor>
|
||||
<mvc:mapping path="/preAddFilm"/>
|
||||
<mvc:mapping path="/addFilm"/>
|
||||
<bean class="com.eshop.interceptor.AuthInterceptor"></bean>
|
||||
</mvc:interceptor>
|
||||
</mvc:interceptors>-->
|
||||
</beans>
|
51
web/WEB-INF/web.xml
Normal file
51
web/WEB-INF/web.xml
Normal file
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://java.sun.com/xml/ns/javaee"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
|
||||
id="WebApp_ID" version="3.0">
|
||||
<display-name>EShop</display-name>
|
||||
<welcome-file-list>
|
||||
<welcome-file>index.jsp</welcome-file>
|
||||
</welcome-file-list>
|
||||
|
||||
<!-- 配置spring -->
|
||||
<listener>
|
||||
<listener-class>
|
||||
org.springframework.web.context.ContextLoaderListener
|
||||
</listener-class>
|
||||
</listener>
|
||||
<context-param>
|
||||
<param-name>contextConfigLocation</param-name>
|
||||
<param-value>WEB-INF/spring.xml</param-value>
|
||||
</context-param>
|
||||
|
||||
<!-- 配置springMVC DispatcherServlet -->
|
||||
<servlet>
|
||||
<servlet-name>dispatcher</servlet-name>
|
||||
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
|
||||
<init-param>
|
||||
<param-name>contextConfigLocation</param-name>
|
||||
<param-value>WEB-INF/springMVC.xml</param-value>
|
||||
</init-param>
|
||||
<load-on-startup>1</load-on-startup>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>dispatcher</servlet-name>
|
||||
<url-pattern>/</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<!-- 配置编码格式 -->
|
||||
<filter>
|
||||
<filter-name>CharacterEncodingFilter</filter-name>
|
||||
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
|
||||
<init-param>
|
||||
<param-name>encoding</param-name>
|
||||
<param-value>utf-8</param-value>
|
||||
</init-param>
|
||||
</filter>
|
||||
<filter-mapping>
|
||||
<filter-name>CharacterEncodingFilter</filter-name>
|
||||
<url-pattern>/*</url-pattern>
|
||||
</filter-mapping>
|
||||
|
||||
</web-app>
|
Reference in New Issue
Block a user