commit
16299374c6
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="src" path="test"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/Java">
|
||||
<attributes>
|
||||
<attribute name="owner.project.facets" value="java"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v7.0">
|
||||
<attributes>
|
||||
<attribute name="owner.project.facets" value="jst.web"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
|
||||
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/junit-4.12.jar"/>
|
||||
<classpathentry kind="output" path="build/classes"/>
|
||||
</classpath>
|
||||
@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>data-aggregation-platform</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.common.project.facet.core.builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.validation.validationbuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
|
||||
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
||||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="WebContent"/>
|
||||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
|
||||
<attributes>
|
||||
<attribute name="hide" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
|
||||
<classpathentry kind="output" path=""/>
|
||||
</classpath>
|
||||
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding//WebContent/WEB-INF/config/config.properties=UTF-8
|
||||
@ -0,0 +1,7 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.7
|
||||
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||
<wb-module deploy-name="data-aggregation-platform">
|
||||
<wb-resource deploy-path="/" source-path="/WebContent" tag="defaultRootSource"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/test"/>
|
||||
<property name="java-output-path" value="/data-aggregation-platform/build/classes"/>
|
||||
<property name="context-root" value="/"/>
|
||||
</wb-module>
|
||||
</project-modules>
|
||||
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<faceted-project>
|
||||
<runtime name="Apache Tomcat v7.0"/>
|
||||
<fixed facet="java"/>
|
||||
<fixed facet="wst.jsdt.web"/>
|
||||
<fixed facet="jst.web"/>
|
||||
<installed facet="java" version="1.7"/>
|
||||
<installed facet="jst.web" version="3.0"/>
|
||||
<installed facet="wst.jsdt.web" version="1.0"/>
|
||||
</faceted-project>
|
||||
@ -0,0 +1 @@
|
||||
org.eclipse.wst.jsdt.launching.baseBrowserLibrary
|
||||
@ -0,0 +1 @@
|
||||
Window
|
||||
@ -0,0 +1,3 @@
|
||||
Manifest-Version: 1.0
|
||||
Class-Path:
|
||||
|
||||
@ -0,0 +1,39 @@
|
||||
#=============================================================================================================
|
||||
# MySQL连接配置
|
||||
#=============================================================================================================
|
||||
# 驱动程序
|
||||
jdbc.mysql.driver=com.mysql.jdbc.Driver
|
||||
# 连接url
|
||||
jdbc.mysql.url=jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true
|
||||
# 用户名
|
||||
jdbc.mysql.username=root
|
||||
# 密码
|
||||
jdbc.mysql.password=root
|
||||
|
||||
#=============================================================================================================
|
||||
# Oracle 连接配置
|
||||
#=============================================================================================================
|
||||
# 驱动程序
|
||||
jdbc.oracle.driver=oracle.jdbc.driver.OracleDriver
|
||||
# 连接url
|
||||
jdbc.oracle.url=jdbc:oracle:thin:@localhost:1521:orcl;
|
||||
# 用户名
|
||||
jdbc.oracle.username=system
|
||||
# 密码
|
||||
jdbc.oracle.password=oracle
|
||||
|
||||
#=============================================================================================================
|
||||
# 数据库公共配置
|
||||
#=============================================================================================================
|
||||
jdbc.initialSize=5
|
||||
jdbc.minIdle=5
|
||||
jdbc.maxIdle=20
|
||||
jdbc.maxActive=100
|
||||
jdbc.maxWait=100000
|
||||
jdbc.defaultAutoCommit=false
|
||||
jdbc.removeAbandoned=true
|
||||
jdbc.removeAbandonedTimeout=600
|
||||
jdbc.testWhileIdle=true
|
||||
jdbc.timeBetweenEvictionRunsMillis=60000
|
||||
jdbc.numTestsPerEvictionRun=20
|
||||
jdbc.minEvictableIdleTimeMillis=300000
|
||||
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE configuration PUBLIC
|
||||
"-//mybatis.org//DTD Config 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-config.dtd">
|
||||
<configuration>
|
||||
<typeAliases>
|
||||
<typeAlias alias="EncodedInfoEntity" type="com.platform.beans.EncodedInfoEntity"/>
|
||||
</typeAliases>
|
||||
<mappers>
|
||||
</mappers>
|
||||
</configuration>
|
||||
@ -0,0 +1,91 @@
|
||||
<?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:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-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/aop
|
||||
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
|
||||
<!-- 读取db.properties中的属性值 -->
|
||||
<bean
|
||||
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
||||
<property name="location" value="WEB-INF/config/config.properties"></property>
|
||||
</bean>
|
||||
|
||||
<!-- 连接MySQL数据库 -->
|
||||
<bean id="mySQLDataSource"
|
||||
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
|
||||
<property name="driverClassName" value="${jdbc.mysql.driver}" />
|
||||
<property name="url" value="${jdbc.mysql.url}" />
|
||||
<property name="username" value="${jdbc.mysql.username}" />
|
||||
<property name="password" value="${jdbc.mysql.password}" />
|
||||
<property name="initialSize" value="${jdbc.initialSize}" />
|
||||
<property name="minIdle" value="${jdbc.minIdle}" />
|
||||
<property name="maxIdle" value="${jdbc.maxIdle}" />
|
||||
<property name="maxActive" value="${jdbc.maxActive}" />
|
||||
<property name="maxWait" value="${jdbc.maxWait}" />
|
||||
<property name="defaultAutoCommit" value="${jdbc.defaultAutoCommit}" />
|
||||
<property name="removeAbandoned" value="${jdbc.removeAbandoned}" />
|
||||
<property name="removeAbandonedTimeout" value="${jdbc.removeAbandonedTimeout}" />
|
||||
<property name="testWhileIdle" value="${jdbc.testWhileIdle}" />
|
||||
<property name="timeBetweenEvictionRunsMillis" value="${jdbc.timeBetweenEvictionRunsMillis}" />
|
||||
<property name="numTestsPerEvictionRun" value="${jdbc.numTestsPerEvictionRun}" />
|
||||
<property name="minEvictableIdleTimeMillis" value="${jdbc.minEvictableIdleTimeMillis}" />
|
||||
</bean>
|
||||
<bean id="mySQLSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
|
||||
<property name="dataSource" ref="mySQLDataSource" />
|
||||
</bean>
|
||||
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
|
||||
<property name="basePackage" value="com.platform.dao" />
|
||||
</bean>
|
||||
<!-- 配置声明式事物 事物管理器 -->
|
||||
<bean id="mySQLTxManager"
|
||||
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
|
||||
<property name="dataSource" ref="mySQLDataSource" />
|
||||
</bean>
|
||||
<tx:advice id="txAdvice" transaction-manager="mySQLTxManager">
|
||||
<tx:attributes>
|
||||
<tx:method name="delete*" propagation="REQUIRED" />
|
||||
<tx:method name="insert*" propagation="REQUIRED" />
|
||||
<tx:method name="update*" propagation="REQUIRED" />
|
||||
<tx:method name="get*" read-only="true" />
|
||||
<tx:method name="select*" read-only="true" />
|
||||
</tx:attributes>
|
||||
</tx:advice>
|
||||
<aop:config>
|
||||
<aop:pointcut id="pointcut"
|
||||
expression="execution(* com.platform.service.*.*(..))" />
|
||||
<aop:advisor advice-ref="txAdvice" pointcut-ref="pointcut" />
|
||||
</aop:config>
|
||||
|
||||
<!-- 连接oracle数据库 -->
|
||||
<!-- <bean id="oracleDataSource"
|
||||
class="org.springframework.jdbc.datasource.DriverManagerDataSource"
|
||||
destroy-method="close">
|
||||
<property name="driverClassName" value="${jdbc.oracle.driver}" />
|
||||
<property name="url" value="${jdbc.oracle.url}" />
|
||||
<property name="username" value="${jdbc.oracle.username}" />
|
||||
<property name="password" value="${jdbc.oracle.password}" />
|
||||
<property name="initialSize" value="${jdbc.initialSize}" />
|
||||
<property name="minIdle" value="${jdbc.minIdle}" />
|
||||
<property name="maxIdle" value="${jdbc.maxIdle}" />
|
||||
<property name="maxActive" value="${jdbc.maxActive}" />
|
||||
<property name="maxWait" value="${jdbc.maxWait}" />
|
||||
<property name="defaultAutoCommit" value="${jdbc.defaultAutoCommit}" />
|
||||
<property name="removeAbandoned" value="${jdbc.removeAbandoned}" />
|
||||
<property name="removeAbandonedTimeout" value="${jdbc.removeAbandonedTimeout}" />
|
||||
<property name="testWhileIdle" value="${jdbc.testWhileIdle}" />
|
||||
<property name="timeBetweenEvictionRunsMillis" value="${jdbc.timeBetweenEvictionRunsMillis}" />
|
||||
<property name="numTestsPerEvictionRun" value="${jdbc.numTestsPerEvictionRun}" />
|
||||
<property name="minEvictableIdleTimeMillis" value="${jdbc.minEvictableIdleTimeMillis}" />
|
||||
</bean> -->
|
||||
<context:component-scan base-package="com.platform.*">
|
||||
<context:exclude-filter type="annotation"
|
||||
expression="org.springframework.stereotype.Controller" />
|
||||
</context:component-scan>
|
||||
</beans>
|
||||
@ -0,0 +1,36 @@
|
||||
<?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"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
|
||||
|
||||
<context:component-scan base-package="com.platform.controller,com.platform.test;" >
|
||||
<context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
|
||||
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Service"/>
|
||||
</context:component-scan>
|
||||
|
||||
<!-- 用于将对象转换为JSON -->
|
||||
<bean id="stringConverter"
|
||||
class="org.springframework.http.converter.StringHttpMessageConverter">
|
||||
<property name="supportedMediaTypes">
|
||||
<list>
|
||||
<value>application/json;charset=UTF-8</value>
|
||||
<value>text/html;charset=UTF-8</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="jsonConverter"
|
||||
class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter"/>
|
||||
<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
|
||||
<property name="messageConverters">
|
||||
<list>
|
||||
<ref bean="stringConverter" />
|
||||
<ref bean="jsonConverter" />
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue