Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dmp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liling
dmp
Commits
a038b5cc
Commit
a038b5cc
authored
Nov 19, 2019
by
liling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add code
parent
8be29ec9
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
396 additions
and
131 deletions
+396
-131
fileHashes.bin
dmp/.gradle/4.4/fileHashes/fileHashes.bin
+0
-0
fileHashes.lock
dmp/.gradle/4.4/fileHashes/fileHashes.lock
+0
-0
workspace.xml
dmp/.idea/workspace.xml
+184
-23
spring-datasource-druid.xml
...t/production/resources/spring/spring-datasource-druid.xml
+40
-0
spring-datasource.xml
...web/out/production/resources/spring/spring-datasource.xml
+60
-0
spring.xml
dmp/dmp-web/out/production/resources/spring/spring.xml
+6
-54
spring-datasource-druid.xml
...web/src/main/resources/spring/spring-datasource-druid.xml
+40
-0
spring-datasource.xml
dmp/dmp-web/src/main/resources/spring/spring-datasource.xml
+60
-0
spring.xml
dmp/dmp-web/src/main/resources/spring/spring.xml
+6
-54
No files found.
dmp/.gradle/4.4/fileHashes/fileHashes.bin
View file @
a038b5cc
No preview for this file type
dmp/.gradle/4.4/fileHashes/fileHashes.lock
View file @
a038b5cc
No preview for this file type
dmp/.idea/workspace.xml
View file @
a038b5cc
This diff is collapsed.
Click to expand it.
dmp/dmp-web/out/production/resources/spring/spring-datasource-druid.xml
0 → 100644
View file @
a038b5cc
<?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:aop=
"http://www.springframework.org/schema/aop"
xmlns:tx=
"http://www.springframework.org/schema/tx"
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
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"
>
<bean
name=
"druidDataSource"
parent=
"dataSourceParent"
>
<property
name=
"url"
value=
"jdbc:mysql://dev.config.duibar.com:3306/druid_quartz_statistics"
></property>
<property
name=
"username"
value=
"dev"
></property>
<property
name=
"password"
value=
"dev_fas015"
></property>
</bean>
<bean
id=
"druidSqlSessionTemplate"
class=
"org.mybatis.spring.SqlSessionTemplate"
>
<constructor-arg>
<bean
class=
"org.mybatis.spring.SqlSessionFactoryBean"
>
<!-- 实例化sqlSessionFactory时需要使用上述配置好的数据源以及SQL映射文件 -->
<property
name=
"dataSource"
ref=
"druidDataSource"
/>
<property
name=
"mapperLocations"
>
<array>
<value>
classpath*:mybatis/druid/*.xml
</value>
</array>
</property>
<property
name=
"configLocation"
value=
"classpath:mybatis/sqlMapConfig.xml"
/>
<property
name=
"typeAliasesPackage"
value=
"cn.com.duiba.dmp.common.entity"
/>
</bean>
</constructor-arg>
</bean>
<bean
class=
"org.mybatis.spring.mapper.MapperScannerConfigurer"
>
<property
name=
"sqlSessionTemplateBeanName"
value=
"druidSqlSessionTemplate"
/>
<property
name=
"basePackage"
value=
"cn.com.duiba.dmp.dal.mapper.druid"
/>
</bean>
</beans>
dmp/dmp-web/out/production/resources/spring/spring-datasource.xml
0 → 100644
View file @
a038b5cc
<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:aop=
"http://www.springframework.org/schema/aop"
xmlns:tx=
"http://www.springframework.org/schema/tx"
xmlns:context=
"http://www.springframework.org/schema/context"
xsi:schemaLocation=
"http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"
default-autowire=
"byName"
>
<bean
id=
"dataSourceParent"
class=
"org.apache.commons.dbcp2.BasicDataSource"
destroy-method=
"close"
abstract=
"true"
>
<property
name=
"driverClassName"
value=
"com.mysql.jdbc.Driver"
></property>
<property
name=
"initialSize"
value=
"3"
/>
<property
name=
"maxTotal"
value=
"500"
/>
<property
name=
"minIdle"
value=
"3"
/>
<property
name=
"maxIdle"
value=
"5"
/>
<property
name=
"maxWaitMillis"
value=
"30000"
/>
<property
name=
"removeAbandonedOnBorrow"
value=
"true"
/>
<!-- Timeout in seconds before an abandoned connection can be removed. Defaults to 300 seconds -->
<property
name=
"removeAbandonedTimeout"
value=
"60"
/>
<property
name=
"logAbandoned"
value=
"true"
/>
<property
name=
"testOnBorrow"
value=
"true"
/>
<property
name=
"timeBetweenEvictionRunsMillis"
value=
"90000"
/>
<!-- 多久testWhileIdle一次 -->
<property
name=
"minEvictableIdleTimeMillis"
value=
"600000"
/>
<!-- 池中的连接空闲多久后被回收,默认值就是30分钟。 -->
<property
name=
"validationQuery"
value=
"SELECT 1"
/>
<property
name=
"testWhileIdle"
value=
"true"
/>
</bean>
<!-- 注解方式配置事务,在service中使用@Transactional使用事务,由于事务不能跨越数据库,必须指定value,比如consumer/credits -->
<tx:annotation-driven
proxy-target-class=
"true"
/>
<bean
name=
"dataSource"
parent=
"dataSourceParent"
>
<!-- com.mchange.v2.c3p0.ComboPooledDataSource -->
<property
name=
"url"
value=
"jdbc:mysql://dev.config.duibar.com:3306/druid_quartz_statistics"
></property>
<property
name=
"username"
value=
"dev"
></property>
<property
name=
"password"
value=
"dev_fas015"
></property>
</bean>
<!-- ========================================针对myBatis的配置项============================== -->
<!-- 配置sqlSessionFactory -->
<bean
id=
"sqlSessionTemplate"
class=
"org.mybatis.spring.SqlSessionTemplate"
>
<constructor-arg>
<bean
class=
"org.mybatis.spring.SqlSessionFactoryBean"
>
<!-- 实例化sqlSessionFactory时需要使用上述配置好的数据源以及SQL映射文件 -->
<property
name=
"dataSource"
ref=
"dataSource"
/>
<property
name=
"typeAliasesPackage"
value=
"cn.com.duia.dmp.common.entity"
/>
</bean>
</constructor-arg>
</bean>
<!-- 配置Spring的事务管理器 -->
<bean
id=
"transactionManager"
class=
"org.springframework.jdbc.datasource.DataSourceTransactionManager"
>
<property
name=
"dataSource"
ref=
"dataSource"
/>
<qualifier
value=
"dmp"
/>
<!-- 使用@Transactional(DsConstants.DATABASE_QIHO)来指定使用该事务管理器 -->
</bean>
</beans>
dmp/dmp-web/out/production/resources/spring/spring.xml
View file @
a038b5cc
<?xml version="1.0" encoding="UTF-8"?>
<?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:aop=
"http://www.springframework.org/schema/aop"
xmlns:tx=
"http://www.springframework.org/schema/tx"
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
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"
>
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"
default-autowire=
"byName"
>
<bean
id=
"dataSourceParent1"
class=
"org.apache.commons.dbcp2.BasicDataSource"
destroy-method=
"close"
abstract=
"true"
>
<property
name=
"driverClassName"
value=
"com.mysql.jdbc.Driver"
></property>
<property
name=
"initialSize"
value=
"3"
/>
<property
name=
"maxTotal"
value=
"500"
/>
<property
name=
"minIdle"
value=
"3"
/>
<property
name=
"maxIdle"
value=
"5"
/>
<property
name=
"maxWaitMillis"
value=
"30000"
/>
<property
name=
"removeAbandonedOnBorrow"
value=
"true"
/>
<!-- Timeout in seconds before an abandoned connection can be removed. Defaults to 300 seconds -->
<property
name=
"removeAbandonedTimeout"
value=
"60"
/>
<property
name=
"logAbandoned"
value=
"true"
/>
<property
name=
"testOnBorrow"
value=
"true"
/>
<property
name=
"timeBetweenEvictionRunsMillis"
value=
"90000"
/>
<!-- 多久testWhileIdle一次 -->
<property
name=
"minEvictableIdleTimeMillis"
value=
"600000"
/>
<!-- 池中的连接空闲多久后被回收,默认值就是30分钟。 -->
<property
name=
"validationQuery"
value=
"SELECT 1"
/>
<property
name=
"testWhileIdle"
value=
"true"
/>
</bean>
<bean
name=
"druidServiceDataSource"
parent=
"dataSourceParent1"
>
<property
name=
"url"
value=
"jdbc:mysql://dev.config.duibar.com:3306/druid_quartz_statistics"
></property>
<property
name=
"username"
value=
"dev"
></property>
<property
name=
"password"
value=
"dev_fas015"
></property>
</bean>
<bean
id=
"druidServiceSqlSessionTemplate"
class=
"org.mybatis.spring.SqlSessionTemplate"
>
<constructor-arg>
<bean
class=
"org.mybatis.spring.SqlSessionFactoryBean"
>
<!-- 实例化sqlSessionFactory时需要使用上述配置好的数据源以及SQL映射文件 -->
<property
name=
"dataSource"
ref=
"druidServiceDataSource"
/>
<property
name=
"mapperLocations"
>
<array>
<value>
classpath*:mybatis/druid/*.xml
</value>
</array>
</property>
<property
name=
"configLocation"
value=
"classpath:mybatis/sqlMapConfig.xml"
/>
<property
name=
"typeAliasesPackage"
value=
"cn.com.duia.tuia.test.manager.common.entity"
/>
</bean>
</constructor-arg>
</bean>
<bean
class=
"org.mybatis.spring.mapper.MapperScannerConfigurer"
>
<property
name=
"sqlSessionTemplateBeanName"
value=
"druidServiceSqlSessionTemplate"
/>
<property
name=
"basePackage"
value=
"cn.com.duiba.dmp.dal.mapper.druid"
/>
</bean>
<import
resource=
"spring-datasource.xml"
/>
<import
resource=
"spring-datasource-druid.xml"
/>
</beans>
\ No newline at end of file
dmp/dmp-web/src/main/resources/spring/spring-datasource-druid.xml
0 → 100644
View file @
a038b5cc
<?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:aop=
"http://www.springframework.org/schema/aop"
xmlns:tx=
"http://www.springframework.org/schema/tx"
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
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"
>
<bean
name=
"druidDataSource"
parent=
"dataSourceParent"
>
<property
name=
"url"
value=
"jdbc:mysql://dev.config.duibar.com:3306/druid_quartz_statistics"
></property>
<property
name=
"username"
value=
"dev"
></property>
<property
name=
"password"
value=
"dev_fas015"
></property>
</bean>
<bean
id=
"druidSqlSessionTemplate"
class=
"org.mybatis.spring.SqlSessionTemplate"
>
<constructor-arg>
<bean
class=
"org.mybatis.spring.SqlSessionFactoryBean"
>
<!-- 实例化sqlSessionFactory时需要使用上述配置好的数据源以及SQL映射文件 -->
<property
name=
"dataSource"
ref=
"druidDataSource"
/>
<property
name=
"mapperLocations"
>
<array>
<value>
classpath*:mybatis/druid/*.xml
</value>
</array>
</property>
<property
name=
"configLocation"
value=
"classpath:mybatis/sqlMapConfig.xml"
/>
<property
name=
"typeAliasesPackage"
value=
"cn.com.duiba.dmp.common.entity"
/>
</bean>
</constructor-arg>
</bean>
<bean
class=
"org.mybatis.spring.mapper.MapperScannerConfigurer"
>
<property
name=
"sqlSessionTemplateBeanName"
value=
"druidSqlSessionTemplate"
/>
<property
name=
"basePackage"
value=
"cn.com.duiba.dmp.dal.mapper.druid"
/>
</bean>
</beans>
dmp/dmp-web/src/main/resources/spring/spring-datasource.xml
0 → 100644
View file @
a038b5cc
<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:aop=
"http://www.springframework.org/schema/aop"
xmlns:tx=
"http://www.springframework.org/schema/tx"
xmlns:context=
"http://www.springframework.org/schema/context"
xsi:schemaLocation=
"http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"
default-autowire=
"byName"
>
<bean
id=
"dataSourceParent"
class=
"org.apache.commons.dbcp2.BasicDataSource"
destroy-method=
"close"
abstract=
"true"
>
<property
name=
"driverClassName"
value=
"com.mysql.jdbc.Driver"
></property>
<property
name=
"initialSize"
value=
"3"
/>
<property
name=
"maxTotal"
value=
"500"
/>
<property
name=
"minIdle"
value=
"3"
/>
<property
name=
"maxIdle"
value=
"5"
/>
<property
name=
"maxWaitMillis"
value=
"30000"
/>
<property
name=
"removeAbandonedOnBorrow"
value=
"true"
/>
<!-- Timeout in seconds before an abandoned connection can be removed. Defaults to 300 seconds -->
<property
name=
"removeAbandonedTimeout"
value=
"60"
/>
<property
name=
"logAbandoned"
value=
"true"
/>
<property
name=
"testOnBorrow"
value=
"true"
/>
<property
name=
"timeBetweenEvictionRunsMillis"
value=
"90000"
/>
<!-- 多久testWhileIdle一次 -->
<property
name=
"minEvictableIdleTimeMillis"
value=
"600000"
/>
<!-- 池中的连接空闲多久后被回收,默认值就是30分钟。 -->
<property
name=
"validationQuery"
value=
"SELECT 1"
/>
<property
name=
"testWhileIdle"
value=
"true"
/>
</bean>
<!-- 注解方式配置事务,在service中使用@Transactional使用事务,由于事务不能跨越数据库,必须指定value,比如consumer/credits -->
<tx:annotation-driven
proxy-target-class=
"true"
/>
<bean
name=
"dataSource"
parent=
"dataSourceParent"
>
<!-- com.mchange.v2.c3p0.ComboPooledDataSource -->
<property
name=
"url"
value=
"jdbc:mysql://dev.config.duibar.com:3306/druid_quartz_statistics"
></property>
<property
name=
"username"
value=
"dev"
></property>
<property
name=
"password"
value=
"dev_fas015"
></property>
</bean>
<!-- ========================================针对myBatis的配置项============================== -->
<!-- 配置sqlSessionFactory -->
<bean
id=
"sqlSessionTemplate"
class=
"org.mybatis.spring.SqlSessionTemplate"
>
<constructor-arg>
<bean
class=
"org.mybatis.spring.SqlSessionFactoryBean"
>
<!-- 实例化sqlSessionFactory时需要使用上述配置好的数据源以及SQL映射文件 -->
<property
name=
"dataSource"
ref=
"dataSource"
/>
<property
name=
"typeAliasesPackage"
value=
"cn.com.duia.dmp.common.entity"
/>
</bean>
</constructor-arg>
</bean>
<!-- 配置Spring的事务管理器 -->
<bean
id=
"transactionManager"
class=
"org.springframework.jdbc.datasource.DataSourceTransactionManager"
>
<property
name=
"dataSource"
ref=
"dataSource"
/>
<qualifier
value=
"dmp"
/>
<!-- 使用@Transactional(DsConstants.DATABASE_QIHO)来指定使用该事务管理器 -->
</bean>
</beans>
dmp/dmp-web/src/main/resources/spring/spring.xml
View file @
a038b5cc
<?xml version="1.0" encoding="UTF-8"?>
<?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:aop=
"http://www.springframework.org/schema/aop"
xmlns:tx=
"http://www.springframework.org/schema/tx"
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
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"
>
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"
default-autowire=
"byName"
>
<bean
id=
"dataSourceParent1"
class=
"org.apache.commons.dbcp2.BasicDataSource"
destroy-method=
"close"
abstract=
"true"
>
<property
name=
"driverClassName"
value=
"com.mysql.jdbc.Driver"
></property>
<property
name=
"initialSize"
value=
"3"
/>
<property
name=
"maxTotal"
value=
"500"
/>
<property
name=
"minIdle"
value=
"3"
/>
<property
name=
"maxIdle"
value=
"5"
/>
<property
name=
"maxWaitMillis"
value=
"30000"
/>
<property
name=
"removeAbandonedOnBorrow"
value=
"true"
/>
<!-- Timeout in seconds before an abandoned connection can be removed. Defaults to 300 seconds -->
<property
name=
"removeAbandonedTimeout"
value=
"60"
/>
<property
name=
"logAbandoned"
value=
"true"
/>
<property
name=
"testOnBorrow"
value=
"true"
/>
<property
name=
"timeBetweenEvictionRunsMillis"
value=
"90000"
/>
<!-- 多久testWhileIdle一次 -->
<property
name=
"minEvictableIdleTimeMillis"
value=
"600000"
/>
<!-- 池中的连接空闲多久后被回收,默认值就是30分钟。 -->
<property
name=
"validationQuery"
value=
"SELECT 1"
/>
<property
name=
"testWhileIdle"
value=
"true"
/>
</bean>
<bean
name=
"druidServiceDataSource"
parent=
"dataSourceParent1"
>
<property
name=
"url"
value=
"jdbc:mysql://dev.config.duibar.com:3306/druid_quartz_statistics"
></property>
<property
name=
"username"
value=
"dev"
></property>
<property
name=
"password"
value=
"dev_fas015"
></property>
</bean>
<bean
id=
"druidServiceSqlSessionTemplate"
class=
"org.mybatis.spring.SqlSessionTemplate"
>
<constructor-arg>
<bean
class=
"org.mybatis.spring.SqlSessionFactoryBean"
>
<!-- 实例化sqlSessionFactory时需要使用上述配置好的数据源以及SQL映射文件 -->
<property
name=
"dataSource"
ref=
"druidServiceDataSource"
/>
<property
name=
"mapperLocations"
>
<array>
<value>
classpath*:mybatis/druid/*.xml
</value>
</array>
</property>
<property
name=
"configLocation"
value=
"classpath:mybatis/sqlMapConfig.xml"
/>
<property
name=
"typeAliasesPackage"
value=
"cn.com.duia.tuia.test.manager.common.entity"
/>
</bean>
</constructor-arg>
</bean>
<bean
class=
"org.mybatis.spring.mapper.MapperScannerConfigurer"
>
<property
name=
"sqlSessionTemplateBeanName"
value=
"druidServiceSqlSessionTemplate"
/>
<property
name=
"basePackage"
value=
"cn.com.duiba.dmp.dal.mapper.druid"
/>
</bean>
<import
resource=
"spring-datasource.xml"
/>
<import
resource=
"spring-datasource-druid.xml"
/>
</beans>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment