Pārlūkot izejas kodu

项目配置修改以及剔除uspa

wangchao 4 gadi atpakaļ
vecāks
revīzija
a8c7c1cf4d

+ 0 - 12
ebc-sea-platform/pom.xml

@ -86,12 +86,6 @@
86 86
		</dependency>
87 87
88 88
89
		<dependency>
90
			<groupId>com.ai.aif</groupId>
91
			<artifactId>uspa</artifactId>
92
			<version>1.1</version>
93
		</dependency>
94
95 89
		<!--uspa start-->
96 90
		<dependency>
97 91
			<groupId>org.springframework</groupId>
@ -107,12 +101,6 @@
107 101
		</dependency>
108 102
109 103
		<dependency>
110
			<groupId>commons-dbcp</groupId>
111
			<artifactId>commons-dbcp</artifactId>
112
			<version>1.4</version>
113
		</dependency>
114
115
		<dependency>
116 104
			<groupId>commons-fileupload</groupId>
117 105
			<artifactId>commons-fileupload</artifactId>
118 106
			<version>1.3.2</version>

+ 1 - 1
ebc-sea-platform/src/main/java/com/ai/ipu/server/config/MyCorsFilter.java

@ -13,7 +13,7 @@ import org.springframework.web.filter.CorsFilter;
13 13
 * @Auther: lihousheng
14 14
 * @Date: 2018/8/17 14:05
15 15
 */
16
@Component
16
17 17
@Configuration
18 18
public class MyCorsFilter {
19 19

+ 0 - 1
ebc-sea-platform/src/main/java/com/ai/ipu/server/dao/impl/MapTagManageDaoImpl.java

@ -12,7 +12,6 @@ import com.alibaba.fastjson.JSON;
12 12
import com.alibaba.fastjson.JSONObject;
13 13
import com.github.pagehelper.PageHelper;
14 14
import com.github.pagehelper.PageInfo;
15
import org.mapstruct.Mapper;
16 15
import org.springframework.stereotype.Component;
17 16
18 17
import java.util.ArrayList;

+ 0 - 43
ebc-sea-platform/src/main/resources/dev/menu.json

@ -1,43 +0,0 @@
1
[
2
  {
3
    "id": "1",
4
    "name": "帮助ReadMe",
5
    "path": "/help",
6
    "icon": "aid-help-circle",
7
    "type": "R",
8
    "remark": "",
9
    "subMenu": []
10
  },
11
  {
12
    "id": "2",
13
    "name": "百度",
14
    "path": "/iframe",
15
    "icon": "aid-search-web",
16
    "type": "F",
17
    "remark": "https://www.baidu.com/",
18
    "subMenu": []
19
  },
20
  {
21
    "id": "3",
22
    "name": "二级菜单",
23
    "path": "",
24
    "icon": "aid-air-conditioner",
25
    "remark": "",
26
    "subMenu": [
27
      {
28
        "id": "1",
29
        "name": "帮助ReadMe2",
30
        "path": "/help2",
31
        "type": "R",
32
        "remark": "备注"
33
      },
34
      {
35
        "id": "2",
36
        "name": "百度2",
37
        "path": "/iframe2",
38
        "type": "F",
39
        "remark": "https://www.baidu.com/"
40
      }
41
    ]
42
  }
43
]

+ 0 - 45
ebc-sea-platform/src/main/resources/dev/uspaJDBC.properties

@ -1,45 +0,0 @@
1
uspa.jdbc.driverClassName=com.mysql.jdbc.Driver
2
uspa.jdbc.maxActive=2
3
uspa.jdbc.maxIdle=2
4
uspa.jdbc.maxWait=2000
5
uspa.jdbc.defaultAutoCommit=true
6
uspa.jdbc.initialSize=1
7
uspa.jdbc.timeBetweenEvictionRunsMillis=2000
8
uspa.jdbc.minEvictableIdleTimeMillis=2000
9
uspa.jdbc.validationQuery=select 1 from dual
10
uspa.jdbc.testOnBorrow=true
11
uspa.jdbc.validationQueryTimeout=20
12
13
#useUnicode=true&amp;characterEncoding=utf-8
14
#uspa.jdbc.url=jdbc:mysql://10.1.252.196:3306/uspa?characterEncoding=utf8&autoReconnect=true&serverTimezone=GMT%2B8&useSSL=false
15
#uspa.jdbc.username=root
16
#uspa.jdbc.password=asdsadadaUda4u!@
17
18
useUnicode=true&amp;characterEncoding=utf-8
19
uspa.jdbc.url=jdbc:mysql://121.42.183.206:3307/ebc?characterEncoding=utf8&autoReconnect=true&serverTimezone=GMT%2B8&useSSL=false
20
uspa.jdbc.username=ipu
21
uspa.jdbc.password=ipumysql
22
23
# 数据库配置
24
# org.hibernate.dialect.MySQLInnoDBDialect
25
# org.hibernate.dialect.OracleDialect
26
uspa.hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
27
uspa.hibernate.jdbc.batch_size =100
28
uspa.hibernate.jdbc.fetch_size=100
29
uspa.hibernate.hbm2ddl.auto=update
30
uspa.hibernate.cache.use_second_level_cache=false
31
uspa.hibernate.show_sql=true
32
uspa.hibernate.format_sql=false
33
uspa.hibernate.autoReconnect=true
34
35
## redis configuration ##
36
redis.maxIdle=300
37
redis.minIdle=10
38
redis.maxTotal=500
39
redis.testOnBorrow=true
40
redis.maxWaitMillis=2000
41
redis.testOnReturn=true
42
redis.host=10.1.252.198
43
redis.port=6379
44
redis.timeout=2000
45
# end #

+ 0 - 1
ebc-sea-platform/src/main/resources/ipu-spring-mvc.xml

@ -14,5 +14,4 @@
14 14
	<!-- <aop:aspectj-autoproxy proxy-target-class="true"/>
15 15
	<context:annotation-config />
16 16
	<bean id="transcationAspects" class="com.ai.ipu.nosql.aspect.TransactionAspect" /> -->
17
	<import resource="uspaContext.xml"/>
18 17
</beans> 

+ 12 - 26
ebc-sea-platform/src/main/resources/pro/application.properties

@ -2,44 +2,30 @@
2 2
######也可以通过启动命令行参数实现:java -jar myproject.jar --server.port=9084
3 3
server.port=unknown
4 4
5
web.root=webapp/
6 5
#会影响拦截器的配置exclude-mapping
7 6
spring.mvc.static-path-pattern=/**
8
#spring.resources.static-locations=file:${web.root}
9
spring.resources.static-locations=classpath:/${web.root}
10 7
11 8
######context-path默认/
12
server.context-path=/
9
server.context-path=/ipu
13 10
######注册DispatcherServlet对应path,亦可通过dispatcherRegistration方法配置
14 11
#server.servlet-path=/ipu1
15 12
#使用maven中的变量替换
16 13
logging.file=target/logs/${project.artifactId}.log
17 14
spring.application.name=${project.artifactId}
18 15
19
######sba监控
20
management.security.enabled=false
21
spring.boot.admin.url=http://www.aiipu.com:8888
22
security.user.name=ipu
23
security.user.password=ipu
24
spring.boot.admin.client.metadata.user.name=${security.user.name}
25
spring.boot.admin.client.metadata.user.password=${security.user.password}
16
######session使用默认
17
spring.session.store-type=none
26 18
27
######查看spring错误日志
28
#logging.level.org.springframework=DEBUG
29
30
######session使用redis
31
spring.session.store-type=redis
32
######redis集群和连接池相关配置
33
spring.redis.cluster.nodes=123.57.35.51:11001,123.57.35.51:11002,123.57.35.51:11003,123.57.35.51:11004,123.57.35.51:11005,123.57.35.51:11006
34
spring.redis.cluster.timeout=5
35
spring.redis.cluster.max-redirects=3
36
spring.redis.password=ipu
37
spring.redis.pool.max-active=8
38
spring.redis.pool.max-idle=8
39
spring.redis.pool.max-wait=-1
40
#默认0,不回收
41
spring.redis.pool.min-idle=8
19
#设置开启热部署
20
spring.devtools.restart.enabled=true
21
#重启目录
22
spring.devtools.restart.additional-paths=src/main/java
23
spring.devtools.restart.exclude=WEB-INF/**
42 24
43 25
#北向登录账号和密码
44 26
aap.iot.userCode=IOT_ADMIN
45 27
aap.iot.passWord=123456
28
29
#gis登录账号和密码
30
aap.gis.userName=EBC_PPRS
31
aap.gis.passwd=ITBS93wMYHosT

+ 13 - 27
ebc-sea-platform/src/main/resources/pro/ipu-mybatis-config.xml

@ -1,38 +1,24 @@
1 1
<?xml version="1.0" encoding="UTF-8" ?>
2 2
<!DOCTYPE configuration
3
    PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
4
    "http://mybatis.org/dtd/mybatis-3-config.dtd">
3
		PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
4
		"http://mybatis.org/dtd/mybatis-3-config.dtd">
5 5
6 6
<configuration>
7
    <settings>
7
	<settings>
8 8
		<setting name="defaultFetchSize" value="1000" /> <!-- 结果集获取数量提示值,分批传输 -->
9 9
	</settings>
10
    <plugins>
11
        <!-- 分页插件,可根据参数定制化 -->
12
	    <plugin interceptor="com.github.pagehelper.PageInterceptor">
13
	        <!-- config params as the following -->
14
		</plugin>
10
	<plugins>
11
		<!-- 分页插件,可根据参数定制化 -->
12
		<plugin interceptor="com.github.pagehelper.PageInterceptor"></plugin>
13
		<plugin interceptor="com.ai.ipu.sql.mgmt.mybatis.SqlMgmtPlugin"></plugin>
15 14
	</plugins>
16
	<environments default="test">
17
		<environment id="test">
15
	<environments default="ebc">
16
		<environment id="ebc">
18 17
			<transactionManager type="JDBC" />
19
			<dataSource type="com.ai.ipu.database.datasource.C3P0DataSourceFactory">
20
				<property name="driverClass" value="com.mysql.jdbc.Driver" />
21
				<property name="jdbcUrl" value="jdbc:mysql://121.42.183.206:3307/test" />
22
				<property name="user" value="ipu" />
23
				<property name="password" value="ipumysql" />
24
				<!-- 连接池用完时,等待获取新连接的时间 (毫秒) -->
25
				<property name="checkoutTimeout" value="5000" />
26
				<!--定义在从数据库获取新连接失败后重复尝试的次数。Default: 30 -->
27
				<property name="acquireRetryAttempts" value="5" />
28
				<!--两次连接中间隔时间,单位毫秒。Default: 1000 -->
29
				<property name="acquireRetryDelay" value="1000" />
30
				<property name="initialPoolSize" value="3" />
31
				<property name="minPoolSize" value="3" />
32
				<property name="maxPoolSize" value="3" />
33
				<property name="maxIdleTime" value="600" />
34
				<property name="idleConnectionTestPeriod" value="60" />
35
				<property name="preferredTestQuery" value="SELECT 1" />
18
			<dataSource type="com.ai.ipu.database.datasource.DruidDataSourceFactory">
19
				<property name="jdbcUrl" value="jdbc:mysql://10.21.20.135:3307/ebc" />
20
				<property name="username" value="ebc" />
21
				<property name="password" value="ebc@123" />
36 22
			</dataSource>
37 23
		</environment>
38 24
	</environments>

+ 32 - 0
ebc-sea-platform/src/main/resources/pro/log4j2.xml

@ -0,0 +1,32 @@
1
<?xml version="1.0" encoding="UTF-8"?>
2
<Configuration status="WARN">
3
    <Properties>
4
        <!-- 配置日志文件输出目录,此配置将日志输出到tomcat根目录下的指定文件夹 -->
5
        <Property name="LOG_HOME">${sys:log.path:-target}</Property>
6
    </Properties>
7
    <Appenders>
8
        <Console name="Console" target="SYSTEM_OUT">
9
            <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
10
        </Console>
11
        <RollingFile name="File" fileName="${LOG_HOME}/ebc-sea-platform.log" filePattern="${LOG_HOME}/ebc-sea-platform-%d{yyyy-MM-dd}.log">
12
            <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
13
            <Policies>
14
                <TimeBasedTriggeringPolicy modulate="true" interval="1"/>
15
            </Policies>
16
        </RollingFile>
17
        <RollingFile name="FileError" fileName="${LOG_HOME}/ebc-sea-platform-error.log" filePattern="${LOG_HOME}/ebc-sea-platform-error-%d{yyyy-MM-dd}.log">
18
            <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
19
            <Policies>
20
                <TimeBasedTriggeringPolicy modulate="true" interval="1"/>
21
            </Policies>
22
        </RollingFile>
23
    </Appenders>
24
    <Loggers>
25
        <Root level="all">
26
            <AppenderRef ref="Console"/>
27
        </Root>
28
        <logger name="com.ai.ipu" level="DEBUG"></logger>
29
        <logger name="org" level="WARN"></logger>
30
        <logger name="io.netty" level="INFO"></logger>
31
    </Loggers>
32
</Configuration>

+ 25 - 0
ebc-sea-platform/src/main/resources/pro/logback.xml

@ -0,0 +1,25 @@
1
<?xml version="1.0" encoding="UTF-8"?>
2
<configuration>
3
	<include resource="org/springframework/boot/logging/logback/base.xml" /> <!-- logback 提供的基本配置 -->
4
5
	<!-- 控制台 -->
6
	<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
7
		<encoder charset="UTF-8">
8
			<!-- <pattern>[%d{yyyy-MM-dd HH:mm:ss.SSS}] %5p %m%n</pattern> -->
9
			<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} {%thread} %-5level %logger{50}-%msg%n</pattern>
10
			<charset>UTF-8</charset> <!-- 解决中文乱码问题 -->
11
		</encoder>
12
	</appender>
13
14
	<!-- <root level="DEBUG"> -->
15
	<root level="ERROR"> <appender-ref ref="CONSOLE" /> </root> 
16
17
	<!-- 将上面两个 appender 关联到我们的项目 -->
18
	<logger name="com.ai.ipu" level="DEBUG"
19
		additivity="false"> <!-- name 是项目包名,为了方便调试,输出 DEBUG 级别及其以上的log -->
20
		<appender-ref ref="CONSOLE" />
21
	</logger>
22
        
23
	<logger name="org.springframework" level="INFO" />   <!-- spring 包下的 logger, 只输出 INFO 级别的 -->
24
25
</configuration> 

+ 0 - 45
ebc-sea-platform/src/main/resources/pro/uspaJDBC.properties

@ -1,45 +0,0 @@
1
uspa.jdbc.driverClassName=com.mysql.jdbc.Driver
2
uspa.jdbc.maxActive=2
3
uspa.jdbc.maxIdle=2
4
uspa.jdbc.maxWait=2000
5
uspa.jdbc.defaultAutoCommit=true
6
uspa.jdbc.initialSize=1
7
uspa.jdbc.timeBetweenEvictionRunsMillis=2000
8
uspa.jdbc.minEvictableIdleTimeMillis=2000
9
uspa.jdbc.validationQuery=select 1 from dual
10
uspa.jdbc.testOnBorrow=true
11
uspa.jdbc.validationQueryTimeout=20
12
13
#useUnicode=true&amp;characterEncoding=utf-8
14
#uspa.jdbc.url=jdbc:mysql://10.1.252.196:3306/uspa?characterEncoding=utf8&autoReconnect=true&serverTimezone=GMT%2B8&useSSL=false
15
#uspa.jdbc.username=root
16
#uspa.jdbc.password=asdsadadaUda4u!@
17
18
useUnicode=true&amp;characterEncoding=utf-8
19
uspa.jdbc.url=jdbc:mysql://121.42.183.206:3307/ebc?characterEncoding=utf8&autoReconnect=true&serverTimezone=GMT%2B8&useSSL=false
20
uspa.jdbc.username=ipu
21
uspa.jdbc.password=ipumysql
22
23
# 数据库配置
24
# org.hibernate.dialect.MySQLInnoDBDialect
25
# org.hibernate.dialect.OracleDialect
26
uspa.hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
27
uspa.hibernate.jdbc.batch_size =100
28
uspa.hibernate.jdbc.fetch_size=100
29
uspa.hibernate.hbm2ddl.auto=update
30
uspa.hibernate.cache.use_second_level_cache=false
31
uspa.hibernate.show_sql=true
32
uspa.hibernate.format_sql=false
33
uspa.hibernate.autoReconnect=true
34
35
## redis configuration ##
36
redis.maxIdle=300
37
redis.minIdle=10
38
redis.maxTotal=500
39
redis.testOnBorrow=true
40
redis.maxWaitMillis=2000
41
redis.testOnReturn=true
42
redis.host=10.1.252.198
43
redis.port=6379
44
redis.timeout=2000
45
# end #

+ 12 - 26
ebc-sea-platform/src/main/resources/test/application.properties

@ -2,44 +2,30 @@
2 2
######也可以通过启动命令行参数实现:java -jar myproject.jar --server.port=9084
3 3
server.port=unknown
4 4
5
web.root=webapp/
6 5
#会影响拦截器的配置exclude-mapping
7 6
spring.mvc.static-path-pattern=/**
8
#spring.resources.static-locations=file:${web.root}
9
spring.resources.static-locations=classpath:/${web.root}
10 7
11 8
######context-path默认/
12
server.context-path=/
9
server.context-path=/ipu
13 10
######注册DispatcherServlet对应path,亦可通过dispatcherRegistration方法配置
14 11
#server.servlet-path=/ipu1
15 12
#使用maven中的变量替换
16 13
logging.file=target/logs/${project.artifactId}.log
17 14
spring.application.name=${project.artifactId}
18 15
19
######sba监控
20
management.security.enabled=false
21
spring.boot.admin.url=http://127.0.0.1:8888
22
security.user.name=ipu
23
security.user.password=ipu
24
spring.boot.admin.client.metadata.user.name=${security.user.name}
25
spring.boot.admin.client.metadata.user.password=${security.user.password}
16
######session使用默认
17
spring.session.store-type=none
26 18
27
######查看spring错误日志
28
#logging.level.org.springframework=DEBUG
29
30
######session使用redis
31
spring.session.store-type=redis
32
######redis集群和连接池相关配置
33
spring.redis.cluster.nodes=123.57.35.51:11001,123.57.35.51:11002,123.57.35.51:11003,123.57.35.51:11004,123.57.35.51:11005,123.57.35.51:11006
34
spring.redis.cluster.timeout=5
35
spring.redis.cluster.max-redirects=3
36
spring.redis.password=ipu
37
spring.redis.pool.max-active=8
38
spring.redis.pool.max-idle=8
39
spring.redis.pool.max-wait=-1
40
#默认0,不回收
41
spring.redis.pool.min-idle=8
19
#设置开启热部署
20
spring.devtools.restart.enabled=true
21
#重启目录
22
spring.devtools.restart.additional-paths=src/main/java
23
spring.devtools.restart.exclude=WEB-INF/**
42 24
43 25
#北向登录账号和密码
44 26
aap.iot.userCode=IOT_ADMIN
45 27
aap.iot.passWord=123456
28
29
#gis登录账号和密码
30
aap.gis.userName=EBC_PPRS
31
aap.gis.passwd=ITBS93wMYHosT

+ 5 - 19
ebc-sea-platform/src/main/resources/test/ipu-mybatis-config.xml

@ -8,31 +8,17 @@
8 8
		<setting name="defaultFetchSize" value="1000" /> <!-- 结果集获取数量提示值,分批传输 -->
9 9
	</settings>
10 10
    <plugins>
11
        <!-- 分页插件,可根据参数定制化 -->
12
	    <plugin interceptor="com.github.pagehelper.PageInterceptor">
13
	        <!-- config params as the following -->
14
		</plugin>
11
		<!-- 分页插件,可根据参数定制化 -->
12
		<plugin interceptor="com.github.pagehelper.PageInterceptor"></plugin>
13
		<plugin interceptor="com.ai.ipu.sql.mgmt.mybatis.SqlMgmtPlugin"></plugin>
15 14
	</plugins>
16 15
	<environments default="ebc">
17 16
		<environment id="ebc">
18 17
			<transactionManager type="JDBC" />
19
			<dataSource type="com.ai.ipu.database.datasource.C3P0DataSourceFactory">
20
				<property name="driverClass" value="com.mysql.jdbc.Driver" />
18
			<dataSource type="com.ai.ipu.database.datasource.DruidDataSourceFactory">
21 19
				<property name="jdbcUrl" value="jdbc:mysql://10.21.20.135:3307/ebc" />
22
				<property name="user" value="ebc" />
20
				<property name="username" value="ebc" />
23 21
				<property name="password" value="ebc@123" />
24
				<!-- 连接池用完时,等待获取新连接的时间 (毫秒) -->
25
				<property name="checkoutTimeout" value="5000" />
26
				<!--定义在从数据库获取新连接失败后重复尝试的次数。Default: 30 -->
27
				<property name="acquireRetryAttempts" value="5" />
28
				<!--两次连接中间隔时间,单位毫秒。Default: 1000 -->
29
				<property name="acquireRetryDelay" value="1000" />
30
				<property name="initialPoolSize" value="3" />
31
				<property name="minPoolSize" value="3" />
32
				<property name="maxPoolSize" value="3" />
33
				<property name="maxIdleTime" value="600" />
34
				<property name="idleConnectionTestPeriod" value="60" />
35
				<property name="preferredTestQuery" value="SELECT 1" />
36 22
			</dataSource>
37 23
		</environment>
38 24
	</environments>

+ 32 - 0
ebc-sea-platform/src/main/resources/test/log4j2.xml

@ -0,0 +1,32 @@
1
<?xml version="1.0" encoding="UTF-8"?>
2
<Configuration status="WARN">
3
    <Properties>
4
        <!-- 配置日志文件输出目录,此配置将日志输出到tomcat根目录下的指定文件夹 -->
5
        <Property name="LOG_HOME">${sys:log.path:-target}</Property>
6
    </Properties>
7
    <Appenders>
8
        <Console name="Console" target="SYSTEM_OUT">
9
            <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
10
        </Console>
11
        <RollingFile name="File" fileName="${LOG_HOME}/ebc-sea-platform.log" filePattern="${LOG_HOME}/ebc-sea-platform-%d{yyyy-MM-dd}.log">
12
            <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
13
            <Policies>
14
                <TimeBasedTriggeringPolicy modulate="true" interval="1"/>
15
            </Policies>
16
        </RollingFile>
17
        <RollingFile name="FileError" fileName="${LOG_HOME}/ebc-sea-platform-error.log" filePattern="${LOG_HOME}/ebc-sea-platform-error-%d{yyyy-MM-dd}.log">
18
            <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
19
            <Policies>
20
                <TimeBasedTriggeringPolicy modulate="true" interval="1"/>
21
            </Policies>
22
        </RollingFile>
23
    </Appenders>
24
    <Loggers>
25
        <Root level="all">
26
            <AppenderRef ref="Console"/>
27
        </Root>
28
        <logger name="com.ai.ipu" level="DEBUG"></logger>
29
        <logger name="org" level="WARN"></logger>
30
        <logger name="io.netty" level="INFO"></logger>
31
    </Loggers>
32
</Configuration>

+ 25 - 0
ebc-sea-platform/src/main/resources/test/logback.xml

@ -0,0 +1,25 @@
1
<?xml version="1.0" encoding="UTF-8"?>
2
<configuration>
3
	<include resource="org/springframework/boot/logging/logback/base.xml" /> <!-- logback 提供的基本配置 -->
4
5
	<!-- 控制台 -->
6
	<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
7
		<encoder charset="UTF-8">
8
			<!-- <pattern>[%d{yyyy-MM-dd HH:mm:ss.SSS}] %5p %m%n</pattern> -->
9
			<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} {%thread} %-5level %logger{50}-%msg%n</pattern>
10
			<charset>UTF-8</charset> <!-- 解决中文乱码问题 -->
11
		</encoder>
12
	</appender>
13
14
	<!-- <root level="DEBUG"> -->
15
	<root level="ERROR"> <appender-ref ref="CONSOLE" /> </root> 
16
17
	<!-- 将上面两个 appender 关联到我们的项目 -->
18
	<logger name="com.ai.ipu" level="DEBUG"
19
		additivity="false"> <!-- name 是项目包名,为了方便调试,输出 DEBUG 级别及其以上的log -->
20
		<appender-ref ref="CONSOLE" />
21
	</logger>
22
        
23
	<logger name="org.springframework" level="INFO" />   <!-- spring 包下的 logger, 只输出 INFO 级别的 -->
24
25
</configuration> 

+ 0 - 45
ebc-sea-platform/src/main/resources/test/uspaJDBC.properties

@ -1,45 +0,0 @@
1
uspa.jdbc.driverClassName=com.mysql.jdbc.Driver
2
uspa.jdbc.maxActive=2
3
uspa.jdbc.maxIdle=2
4
uspa.jdbc.maxWait=2000
5
uspa.jdbc.defaultAutoCommit=true
6
uspa.jdbc.initialSize=1
7
uspa.jdbc.timeBetweenEvictionRunsMillis=2000
8
uspa.jdbc.minEvictableIdleTimeMillis=2000
9
uspa.jdbc.validationQuery=select 1 from dual
10
uspa.jdbc.testOnBorrow=true
11
uspa.jdbc.validationQueryTimeout=20
12
13
#useUnicode=true&amp;characterEncoding=utf-8
14
#uspa.jdbc.url=jdbc:mysql://10.1.252.196:3306/uspa?characterEncoding=utf8&autoReconnect=true&serverTimezone=GMT%2B8&useSSL=false
15
#uspa.jdbc.username=root
16
#uspa.jdbc.password=asdsadadaUda4u!@
17
18
useUnicode=true&amp;characterEncoding=utf-8
19
uspa.jdbc.url=jdbc:mysql://10.21.20.135:3307/ebc?characterEncoding=utf8&autoReconnect=true&serverTimezone=GMT%2B8&useSSL=false
20
uspa.jdbc.username=ebc
21
uspa.jdbc.password=ebc@123
22
23
# 数据库配置
24
# org.hibernate.dialect.MySQLInnoDBDialect
25
# org.hibernate.dialect.OracleDialect
26
uspa.hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
27
uspa.hibernate.jdbc.batch_size =100
28
uspa.hibernate.jdbc.fetch_size=100
29
uspa.hibernate.hbm2ddl.auto=update
30
uspa.hibernate.cache.use_second_level_cache=false
31
uspa.hibernate.show_sql=true
32
uspa.hibernate.format_sql=false
33
uspa.hibernate.autoReconnect=true
34
35
## redis configuration ##
36
redis.maxIdle=300
37
redis.minIdle=10
38
redis.maxTotal=500
39
redis.testOnBorrow=true
40
redis.maxWaitMillis=2000
41
redis.testOnReturn=true
42
redis.host=10.1.252.198
43
redis.port=6379
44
redis.timeout=2000
45
# end #

+ 0 - 24
ebc-sea-platform/src/main/resources/uspa.properties

@ -1,24 +0,0 @@
1
#加密实现类 com.ai.aif.msp.uspa.common.interfaces.IEncrypt
2
encrypt.implclass=com.ai.aif.uspa.common.impl.DefaultHashEncrypt
3
4
#hash加密
5
#MD5|SHA-1|SHA-256|SHA-512
6
hash.algorithm=SHA-256
7
hash.encoding=UTF-8
8
9
uspa.swagger.enable=true
10
11
#会话超时时间,单位秒,同时要注意redis连接设置的时间
12
uspa.session.timeout=1800
13
14
#是否记录操作日志,true/false
15
uspa.record.log = true
16
17
18
#是否开启审批,true/false
19
uspa.need.approve = true
20
21
#是否启用登录验证码,true/false
22
is.check.verify.code = false
23
#登录验证码 URL
24
verify.code.url=http://10.70.114.81/rs/esm/delegate

+ 0 - 182
ebc-sea-platform/src/main/resources/uspaContext.xml

@ -1,182 +0,0 @@
1
<?xml version="1.0" encoding="UTF-8"?>
2
<beans xmlns="http://www.springframework.org/schema/beans"
3
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
4
	xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
5
	xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:task="http://www.springframework.org/schema/task"
6
	xsi:schemaLocation="http://www.springframework.org/schema/beans
7
		http://www.springframework.org/schema/beans/spring-beans.xsd
8
		http://www.springframework.org/schema/context
9
		http://www.springframework.org/schema/context/spring-context.xsd
10
		http://www.springframework.org/schema/tx
11
		http://www.springframework.org/schema/tx/spring-tx.xsd
12
		http://www.springframework.org/schema/mvc
13
		http://www.springframework.org/schema/mvc/spring-mvc.xsd">
14
15
16
	<!-- 默认扫描的包路径 -->
17
18
	<context:component-scan base-package="com.ai.aif.uspa.*" />
19
	<!--<context:component-scan base-package="com.ai.aif.uspa4Ajx.*" />-->
20
	<!--<context:component-scan base-package="com.ai.aif.uspa4A" />-->
21
22
	<context:component-scan base-package="springfox.*" />
23
24
<!--	<mvc:interceptors>
25
		<mvc:interceptor>
26
			<mvc:mapping path="/**" />
27
			<mvc:exclude-mapping path="/index.html" />
28
			<mvc:exclude-mapping path="/api/account/login" />
29
			<mvc:exclude-mapping path="/api/account/loginWithVerifyCode" />
30
			<mvc:exclude-mapping path="/api/account/sendVerifyCode" />
31
			<mvc:exclude-mapping path="/api/account/setUserSession" />
32
            <mvc:exclude-mapping path="/api/user/changePassword" />
33
            <mvc:exclude-mapping path="/v2/**" />
34
			<mvc:exclude-mapping path="/webjars/**" />
35
			<mvc:exclude-mapping path="/api/uspa/client/**" />
36
			<mvc:exclude-mapping path="/UpdateAppAcctSoap" />
37
			<bean class="com.ai.aif.uspa.common.interceptor.UspaInterceptor" />
38
		</mvc:interceptor>
39
40
		&lt;!&ndash; 不拦截页面,防止页面跳转直接显示异常。拦截服务请求,抛出-9999,ajax捕获跳转登录页。 &ndash;&gt;
41
		<mvc:interceptor>
42
			<mvc:mapping path="/**" />
43
			<mvc:exclude-mapping path="/**/*.html" />
44
			<mvc:exclude-mapping path="/api/account/login" />
45
			<mvc:exclude-mapping path="/api/account/loginWithVerifyCode" />
46
			<mvc:exclude-mapping path="/api/account/sendVerifyCode" />
47
			<mvc:exclude-mapping path="/api/account/setUserSession" />
48
            <mvc:exclude-mapping path="/api/user/changePassword" />
49
			<mvc:exclude-mapping path="/swagger*/**" />
50
			<mvc:exclude-mapping path="/v2/**" />
51
			<mvc:exclude-mapping path="/webjars/**" />
52
			<mvc:exclude-mapping path="/frame.do" />
53
			<mvc:exclude-mapping path="/api/uspa/client/**" />
54
			<mvc:exclude-mapping path="/UpdateAppAcctSoap" />
55
			<bean class="com.ai.aif.uspa.common.interceptor.SessionInterceptor" />
56
		</mvc:interceptor>-->
57
58
		<!--<mvc:interceptor> -->
59
		<!--<mvc:mapping path="/**" /> -->
60
		<!--<mvc:exclude-mapping path="/index.html" /> -->
61
		<!--<mvc:exclude-mapping path="/api/account/login" /> -->
62
		<!--<mvc:exclude-mapping path="/v2/**" /> -->
63
		<!--<mvc:exclude-mapping path="/webjars/**" /> -->
64
		<!--<bean class="com.ai.aif.uspa.common.interceptor.PermissionInterceptor" 
65
			/> -->
66
		<!--</mvc:interceptor> -->
67
68
69
<!--	</mvc:interceptors>-->
70
71
	<bean id="hibernateTemplate" class="org.springframework.orm.hibernate4.HibernateTemplate">
72
		<property name="sessionFactory" ref="sessionFactory" />
73
	</bean>
74
75
	<bean id="transactionManager"
76
		class="org.springframework.orm.hibernate4.HibernateTransactionManager"
77
		abstract="false" lazy-init="default" autowire="default">
78
		<property name="sessionFactory" ref="sessionFactory" />
79
	</bean>
80
81
	<bean id="exceptionHandler" class="com.ai.aif.uspa.common.exception.ExceptionHandler" />
82
83
	<!--使用注解来配置事务 -->
84
	<tx:annotation-driven transaction-manager="transactionManager" />
85
86
	<bean id="configuration"
87
		class="org.apache.commons.configuration.PropertiesConfiguration"
88
		init-method="load">
89
		<property name="encoding" value="UTF-8" />
90
		<property name="fileName" value="uspa.properties" />
91
	</bean>
92
93
	<bean id="propertyConfigurer"
94
		class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
95
		<property name="ignoreUnresolvablePlaceholders" value="true" />
96
		<property name="locations">
97
			<list>
98
				<value>classpath*:uspa.properties</value>
99
				<value>classpath*:uspaJDBC.properties</value>
100
			</list>
101
		</property>
102
	</bean>
103
104
105
	<bean id="uspaDataSource" class="org.apache.commons.dbcp.BasicDataSource"
106
		destroy-method="close">
107
		<property name="driverClassName" value="${uspa.jdbc.driverClassName}" />
108
		<property name="url" value="${uspa.jdbc.url}" />
109
		<property name="username" value="${uspa.jdbc.username}" />
110
		<property name="password" value="${uspa.jdbc.password}" />
111
		<property name="initialSize" value="${uspa.jdbc.initialSize}"></property>
112
		<property name="maxActive" value="${uspa.jdbc.maxActive}"></property>
113
		<property name="maxIdle" value="${uspa.jdbc.maxIdle}"></property>
114
		<property name="maxWait" value="${uspa.jdbc.maxWait}"></property>
115
		<property name="defaultAutoCommit" value="${uspa.jdbc.defaultAutoCommit}"></property>
116
		<property name="timeBetweenEvictionRunsMillis" value="${uspa.jdbc.timeBetweenEvictionRunsMillis}"></property>
117
		<property name="minEvictableIdleTimeMillis" value="${uspa.jdbc.minEvictableIdleTimeMillis}" />
118
		<property name="validationQuery" value="${uspa.jdbc.validationQuery}" />
119
		<property name="testOnBorrow" value="${uspa.jdbc.testOnBorrow}" />
120
		<property name="validationQueryTimeout" value="${uspa.jdbc.validationQueryTimeout}" />
121
	</bean>
122
123
	<bean id="sessionFactory"
124
		class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
125
		<property name="dataSource" ref="uspaDataSource"></property>
126
		<property name="hibernateProperties">
127
			<props>
128
				<prop key="hibernate.dialect">${uspa.hibernate.dialect}</prop>
129
				<prop key="hibernate.show_sql">${uspa.hibernate.show_sql}</prop>
130
				<prop key="hibernate.format_sql">${uspa.hibernate.format_sql}</prop>
131
				<prop key="hibernate.current_session_context_class">
132
					org.springframework.orm.hibernate4.SpringSessionContext
133
				</prop>
134
				<prop key="hibernate.autoReconnect">${uspa.hibernate.autoReconnect}</prop>
135
				<prop key="hibernate.connection.autocommit">true</prop>
136
				<prop key="hibernate.jdbc.batch_size">${uspa.hibernate.jdbc.batch_size}</prop>
137
				<prop key="hibernate.jdbc.fetch_size">${uspa.hibernate.jdbc.fetch_size}</prop>
138
				<!--<prop key="hibernate.hbm2ddl.auto">${uspa.hibernate.hbm2ddl.auto}</prop>-->
139
				<prop key="hibernate.cache.use_second_level_cache">${uspa.hibernate.cache.use_second_level_cache}</prop>
140
			</props>
141
		</property>
142
		<property name="packagesToScan">
143
			<list>
144
				<value>com.ai.aif.uspa.domain</value>
145
			</list>
146
		</property>
147
	</bean>
148
149
	<!-- redis -->
150
	<bean id="poolConfig" class="redis.clients.jedis.JedisPoolConfig">
151
		<property name="maxIdle" value="${redis.maxIdle}" />
152
		<property name="minIdle" value="${redis.minIdle}" />
153
		<property name="maxTotal" value="${redis.maxTotal}"/>
154
		<property name="testOnBorrow" value="${redis.testOnBorrow}"/>
155
		<property name="maxWaitMillis" value="${redis.maxWaitMillis}"/>
156
		<property name="testOnReturn" value="${redis.testOnReturn}" />
157
	</bean>
158
159
	<bean id="jedisConnectionFactory" class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory">
160
		<property name="usePool" value="true"/>
161
		<property name="hostName" value="${redis.host}" />
162
		<property name="port" value="${redis.port}" />
163
		<property name="timeout" value="${redis.timeout}" />
164
		<property name="poolConfig" ref="poolConfig"/>
165
	</bean>
166
167
	<bean id="redisTemplate" class="org.springframework.data.redis.core.RedisTemplate">
168
		<property name="connectionFactory" ref="jedisConnectionFactory"/>
169
		<property name="keySerializer"><bean class="org.springframework.data.redis.serializer.StringRedisSerializer"/></property>
170
		<property name="valueSerializer"><bean class="org.springframework.data.redis.serializer.JdkSerializationRedisSerializer"/></property>
171
	</bean>
172
	<!-- redis -->
173
174
	<!-- swagger start -->
175
<!--
176
	<mvc:resources mapping="swagger-ui.html" location="classpath:/META-INF/resources/" />
177
	<mvc:resources mapping="/webjars/**"
178
		location="classpath:/META-INF/resources/webjars/" />
179
-->
180
181
	<!-- swagger end -->
182
</beans>