Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
Project
Project
Details
Activity
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
59ba591d
Commit
59ba591d
authored
Jul 09, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DEV] delete email bean config
parent
fb3b7a65
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
6 additions
and
93 deletions
+6
-93
pom.xml
atms-api/pom.xml
+0
-7
MyMailMapper.java
atms-api/src/main/java/pwc/taxtech/atms/MyMailMapper.java
+0
-5
MybatisConfig.java
atms-api/src/main/java/pwc/taxtech/atms/MybatisConfig.java
+0
-9
MailQueueMapper.java
...i/src/main/java/pwc/taxtech/atms/dao/MailQueueMapper.java
+4
-3
applicationContext-datasource-mail.xml
...src/main/resources/applicationContext-datasource-mail.xml
+0
-46
applicationContext.xml
atms-api/src/main/resources/applicationContext.xml
+0
-15
MailServiceIT.java
...est/java/pwc/taxtech/atms/service/impl/MailServiceIT.java
+2
-8
No files found.
atms-api/pom.xml
View file @
59ba591d
...
...
@@ -163,13 +163,6 @@
<artifactId>
druid
</artifactId>
<version>
1.1.5
</version>
</dependency>
<dependency>
<groupId>
com.microsoft.sqlserver
</groupId>
<artifactId>
mssql-jdbc
</artifactId>
<version>
6.2.2.jre7
</version>
</dependency>
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
...
...
atms-api/src/main/java/pwc/taxtech/atms/MyMailMapper.java
deleted
100644 → 0
View file @
fb3b7a65
package
pwc
.
taxtech
.
atms
;
public
interface
MyMailMapper
{
}
atms-api/src/main/java/pwc/taxtech/atms/MybatisConfig.java
View file @
59ba591d
...
...
@@ -36,13 +36,4 @@ public class MybatisConfig implements InitializingBean {
return
bean
;
}
@Bean
public
static
MapperScannerConfigurer
userMapperConfigurerMail
()
{
MapperScannerConfigurer
bean
=
new
MapperScannerConfigurer
();
bean
.
setMarkerInterface
(
MyMailMapper
.
class
);
bean
.
setBasePackage
(
BASE_PACKAGE
);
bean
.
setSqlSessionTemplateBeanName
(
"sqlSessionTemplateMail"
);
// bean.setSqlSessionFactoryBeanName("sqlSessionFactoryMail");
return
bean
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/dao/MailQueueMapper.java
View file @
59ba591d
package
pwc
.
taxtech
.
atms
.
dao
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.session.RowBounds
;
import
pwc.taxtech.atms.MyMa
ilMa
pper
;
import
pwc.taxtech.atms.MyMapper
;
import
pwc.taxtech.atms.entitiy.MailQueue
;
import
pwc.taxtech.atms.entitiy.MailQueueExample
;
import
java.util.List
;
@Mapper
public
interface
MailQueueMapper
extends
MyMa
ilMa
pper
{
public
interface
MailQueueMapper
extends
MyMapper
{
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dbo.MAILQUEUE
...
...
atms-api/src/main/resources/applicationContext-datasource-mail.xml
deleted
100644 → 0
View file @
fb3b7a65
<?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:tx=
"http://www.springframework.org/schema/tx"
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-4.3.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.3.xsd"
>
<!-- DruidDataSource数据源配置) -->
<!-- See: https://github.com/alibaba/druid/wiki/%E9%85%8D%E7%BD%AE_DruidDataSource%E5%8F%82%E8%80%83%E9%85%8D%E7%BD%AE -->
<bean
id=
"dataSourceMail"
class=
"com.alibaba.druid.pool.DruidDataSource"
init-method=
"init"
destroy-method=
"close"
>
<!-- 基本属性 url、user、password -->
<property
name=
"url"
value=
"${mail_jdbc_url}"
/>
<property
name=
"username"
value=
"${mail_jdbc_user}"
/>
<property
name=
"password"
value=
"${mail_jdbc_password}"
/>
<!-- 配置初始化大小、最小、最大 -->
<property
name=
"initialSize"
value=
"${atms.config.druid.initialSize:0}"
/>
<property
name=
"minIdle"
value=
"${atms.config.druid.minIdle:1}"
/>
<property
name=
"maxActive"
value=
"${atms.config.druid.maxActive:20}"
/>
<!-- 配置获取连接等待超时的时间 -->
<property
name=
"maxWait"
value=
"${atms.config.druid.maxWait:60000}"
/>
<!-- 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 -->
<property
name=
"timeBetweenEvictionRunsMillis"
value=
"${atms.config.druid.timeBetweenEvictionRunsMillis:60000}"
/>
<!-- 配置一个连接在池中最小生存的时间,单位是毫秒 -->
<property
name=
"minEvictableIdleTimeMillis"
value=
"${atms.config.druid.minEvictableIdleTimeMillis:300000}"
/>
<property
name=
"validationQuery"
value=
"${jdbc_validationQuery:select 1 from INFORMATION_SCHEMA.SYSTEM_USERS}"
/>
<property
name=
"testWhileIdle"
value=
"true"
/>
<property
name=
"testOnBorrow"
value=
"false"
/>
<property
name=
"testOnReturn"
value=
"false"
/>
<!-- 打开PSCache,并且指定每个连接上PSCache的大小 -->
<property
name=
"poolPreparedStatements"
value=
"true"
/>
<property
name=
"maxPoolPreparedStatementPerConnectionSize"
value=
"20"
/>
<!-- 配置监控统计拦截的filters -->
<property
name=
"filters"
value=
"stat"
/>
</bean>
</beans>
\ No newline at end of file
atms-api/src/main/resources/applicationContext.xml
View file @
59ba591d
...
...
@@ -32,7 +32,6 @@
</context:component-scan>
<import
resource=
"applicationContext-datasource.xml"
/>
<import
resource=
"applicationContext-datasource-mail.xml"
/>
<bean
id=
"sqlSessionFactory"
class=
"org.mybatis.spring.SqlSessionFactoryBean"
>
<property
name=
"dataSource"
ref=
"dataSource"
/>
...
...
@@ -47,20 +46,6 @@
<bean
id=
"sqlSessionTemplate"
class=
"org.mybatis.spring.SqlSessionTemplate"
>
<constructor-arg
ref=
"sqlSessionFactory"
/>
</bean>
<bean
id=
"sqlSessionFactoryMail"
class=
"org.mybatis.spring.SqlSessionFactoryBean"
>
<property
name=
"dataSource"
ref=
"dataSourceMail"
/>
<property
name=
"configLocation"
value=
"classpath:sqlMapConfig.xml"
/>
<property
name=
"mapperLocations"
>
<array>
<value>
classpath:pwc/taxtech/atms/dao/*Mapper.xml
</value>
</array>
</property>
</bean>
<bean
id=
"sqlSessionTemplateMail"
class=
"org.mybatis.spring.SqlSessionTemplate"
>
<constructor-arg
ref=
"sqlSessionFactoryMail"
/>
</bean>
<!-- <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer"> <property name="basePackage" value="pwc.taxtech.atms" /> </bean> -->
...
...
atms-api/src/test/java/pwc/taxtech/atms/service/impl/MailServiceIT.java
View file @
59ba591d
package
pwc
.
taxtech
.
atms
.
service
.
impl
;
import
java.util.Date
;
import
javax.annotation.Resource
;
import
org.junit.Assert
;
import
org.junit.Before
;
import
org.junit.Test
;
import
org.mybatis.spring.SqlSessionTemplate
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
pwc.taxtech.atms.CommonIT
;
import
pwc.taxtech.atms.dao.MailQueueMapper
;
import
pwc.taxtech.atms.dto.MailMto
;
import
pwc.taxtech.atms.entitiy.MailQueue
;
import
pwc.taxtech.atms.service.CommonService
;
import
java.util.Date
;
public
class
MailServiceIT
extends
CommonIT
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
MailServiceIT
.
class
);
@Autowired
private
CommonService
commonService
;
@Autowired
private
MailQueueMapper
mailQueueMapper
;
@Resource
private
SqlSessionTemplate
sqlSessionTemplateMail
;
@Before
public
void
setUp
()
{
...
...
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