Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jfV5pc
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
管理员
jfV5pc
Commits
f215601a
Commit
f215601a
authored
Aug 08, 2018
by
罗绍泽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11
parent
fe6cf87e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
81 additions
and
23 deletions
+81
-23
applicationContext-business.xml
...ent/WEB-INF/conf/gaowj/bl/applicationContext-business.xml
+66
-18
CasAction.java
src_system/com/gaowj/system/login/CasAction.java
+10
-1
actAction.java
src_system/com/gaowj/uploadfile/actAction.java
+5
-4
No files found.
WebContent/WEB-INF/conf/gaowj/bl/applicationContext-business.xml
View file @
f215601a
...
...
@@ -30,7 +30,7 @@
<!-- 配置初始化大小、最小、最大 -->
<property
name=
"initialSize"
value=
"1"
/>
<property
name=
"minIdle"
value=
"1"
/>
<property
name=
"maxActive"
value=
"
2
0"
/>
<property
name=
"maxActive"
value=
"
50
0"
/>
<!-- 配置获取连接等待超时的时间 -->
<property
name=
"maxWait"
value=
"60000"
/>
...
...
@@ -38,17 +38,33 @@
<!-- 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 -->
<property
name=
"timeBetweenEvictionRunsMillis"
value=
"60000"
/>
<!--
配置一个连接在池中最小生存的时间,单位是毫秒
-->
<property
name=
"
minEvictableIdleTimeMillis"
value=
"300000"
/>
<!--
超过时间限制是否回收,对于建立时间超过removeAbandonedTimeout的连接强制关闭
-->
<property
name=
"
removeAbandoned"
value=
"true"
/>
<!-- 超过时间限制多长,单位秒 -->
<property
name=
"removeAbandonedTimeout"
value=
"60"
/>
<!-- 配置一个连接在池中最小生存的时间,单位是毫秒:1分钟 -->
<property
name=
"minEvictableIdleTimeMillis"
value=
"60000"
/>
<!-- 配置一个连接在池中最长生存的时间,单位是毫秒:5分钟 -->
<property
name=
"maxEvictableIdleTimeMillis"
value=
"300000"
/>
<!-- 用来检测连接是否有效的sql,要求是一个查询语句 -->
<property
name=
"validationQuery"
value=
"SELECT 'x'"
/>
<!-- 申请连接的时候检测 -->
<property
name=
"testWhileIdle"
value=
"true"
/>
<!-- 申请连接时执行validationQuery检测连接是否有效,配置为true会降低性能 -->
<property
name=
"testOnBorrow"
value=
"false"
/>
<!-- 归还连接时执行validationQuery检测连接是否有效,配置为true会降低性能 -->
<property
name=
"testOnReturn"
value=
"false"
/>
<!-- 打开PSCache,并且指定每个连接上PSCache的大小 -->
<property
name=
"poolPreparedStatements"
value=
"true"
/>
<property
name=
"maxPoolPreparedStatementPerConnectionSize"
value=
"20"
/>
<!-- 连接池中的minIdle数量以内的连接,空闲时间超过minEvictableIdleTimeMillis,则会执行keepAlive操作 -->
<property
name=
"keepAlive"
value=
"true"
/>
<!-- 是否缓存preparedStatement,也就是PSCache。PSCache对支持游标的数据库性能提升巨大,比如说oracle。在mysql下建议关闭 -->
<property
name=
"poolPreparedStatements"
value=
"false"
/>
<!-- 要启用PSCache,必须配置大于0,当大于0时,poolPreparedStatements自动触发修改为true -->
<property
name=
"maxPoolPreparedStatementPerConnectionSize"
value=
"0"
/>
<!-- 配置监控统计拦截的filters,去掉后监控界面sql无法统计 -->
<property
name=
"filters"
value=
"stat"
/>
...
...
@@ -65,7 +81,7 @@
<!-- 配置初始化大小、最小、最大 -->
<property
name=
"initialSize"
value=
"1"
/>
<property
name=
"minIdle"
value=
"1"
/>
<property
name=
"maxActive"
value=
"
2
0"
/>
<property
name=
"maxActive"
value=
"
5
0"
/>
<!-- 配置获取连接等待超时的时间 -->
<property
name=
"maxWait"
value=
"60000"
/>
...
...
@@ -73,17 +89,33 @@
<!-- 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 -->
<property
name=
"timeBetweenEvictionRunsMillis"
value=
"60000"
/>
<!-- 配置一个连接在池中最小生存的时间,单位是毫秒 -->
<property
name=
"minEvictableIdleTimeMillis"
value=
"300000"
/>
<!-- 超过时间限制是否回收,对于建立时间超过removeAbandonedTimeout的连接强制关闭 -->
<property
name=
"removeAbandoned"
value=
"true"
/>
<!-- 超过时间限制多长,单位秒 -->
<property
name=
"removeAbandonedTimeout"
value=
"60"
/>
<!-- 配置一个连接在池中最小生存的时间,单位是毫秒:1分钟 -->
<property
name=
"minEvictableIdleTimeMillis"
value=
"60000"
/>
<!-- 配置一个连接在池中最长生存的时间,单位是毫秒:5分钟 -->
<property
name=
"maxEvictableIdleTimeMillis"
value=
"300000"
/>
<!-- 用来检测连接是否有效的sql,要求是一个查询语句 -->
<property
name=
"validationQuery"
value=
"SELECT 'x'"
/>
<!-- 申请连接的时候检测 -->
<property
name=
"testWhileIdle"
value=
"true"
/>
<!-- 申请连接时执行validationQuery检测连接是否有效,配置为true会降低性能 -->
<property
name=
"testOnBorrow"
value=
"false"
/>
<!-- 归还连接时执行validationQuery检测连接是否有效,配置为true会降低性能 -->
<property
name=
"testOnReturn"
value=
"false"
/>
<!-- 打开PSCache,并且指定每个连接上PSCache的大小 -->
<property
name=
"poolPreparedStatements"
value=
"true"
/>
<property
name=
"maxPoolPreparedStatementPerConnectionSize"
value=
"20"
/>
<!-- 连接池中的minIdle数量以内的连接,空闲时间超过minEvictableIdleTimeMillis,则会执行keepAlive操作 -->
<property
name=
"keepAlive"
value=
"true"
/>
<!-- 是否缓存preparedStatement,也就是PSCache。PSCache对支持游标的数据库性能提升巨大,比如说oracle。在mysql下建议关闭 -->
<property
name=
"poolPreparedStatements"
value=
"false"
/>
<!-- 要启用PSCache,必须配置大于0,当大于0时,poolPreparedStatements自动触发修改为true -->
<property
name=
"maxPoolPreparedStatementPerConnectionSize"
value=
"0"
/>
<!-- 配置监控统计拦截的filters,去掉后监控界面sql无法统计 -->
<property
name=
"filters"
value=
"stat"
/>
...
...
@@ -100,7 +132,7 @@
<!-- 配置初始化大小、最小、最大 -->
<property
name=
"initialSize"
value=
"1"
/>
<property
name=
"minIdle"
value=
"1"
/>
<property
name=
"maxActive"
value=
"
2
0"
/>
<property
name=
"maxActive"
value=
"
50
0"
/>
<!-- 配置获取连接等待超时的时间 -->
<property
name=
"maxWait"
value=
"60000"
/>
...
...
@@ -108,17 +140,33 @@
<!-- 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 -->
<property
name=
"timeBetweenEvictionRunsMillis"
value=
"60000"
/>
<!-- 配置一个连接在池中最小生存的时间,单位是毫秒 -->
<property
name=
"minEvictableIdleTimeMillis"
value=
"300000"
/>
<!-- 超过时间限制是否回收,对于建立时间超过removeAbandonedTimeout的连接强制关闭 -->
<property
name=
"removeAbandoned"
value=
"true"
/>
<!-- 超过时间限制多长,单位秒 -->
<property
name=
"removeAbandonedTimeout"
value=
"60"
/>
<!-- 配置一个连接在池中最小生存的时间,单位是毫秒:1分钟 -->
<property
name=
"minEvictableIdleTimeMillis"
value=
"60000"
/>
<!-- 配置一个连接在池中最长生存的时间,单位是毫秒:5分钟 -->
<property
name=
"maxEvictableIdleTimeMillis"
value=
"300000"
/>
<!-- 用来检测连接是否有效的sql,要求是一个查询语句 -->
<property
name=
"validationQuery"
value=
"SELECT 'x'"
/>
<!-- 申请连接的时候检测 -->
<property
name=
"testWhileIdle"
value=
"true"
/>
<!-- 申请连接时执行validationQuery检测连接是否有效,配置为true会降低性能 -->
<property
name=
"testOnBorrow"
value=
"false"
/>
<!-- 归还连接时执行validationQuery检测连接是否有效,配置为true会降低性能 -->
<property
name=
"testOnReturn"
value=
"false"
/>
<!-- 打开PSCache,并且指定每个连接上PSCache的大小 -->
<property
name=
"poolPreparedStatements"
value=
"true"
/>
<property
name=
"maxPoolPreparedStatementPerConnectionSize"
value=
"20"
/>
<!-- 连接池中的minIdle数量以内的连接,空闲时间超过minEvictableIdleTimeMillis,则会执行keepAlive操作 -->
<property
name=
"keepAlive"
value=
"true"
/>
<!-- 是否缓存preparedStatement,也就是PSCache。PSCache对支持游标的数据库性能提升巨大,比如说oracle。在mysql下建议关闭 -->
<property
name=
"poolPreparedStatements"
value=
"false"
/>
<!-- 要启用PSCache,必须配置大于0,当大于0时,poolPreparedStatements自动触发修改为true -->
<property
name=
"maxPoolPreparedStatementPerConnectionSize"
value=
"0"
/>
<!-- 配置监控统计拦截的filters,去掉后监控界面sql无法统计 -->
<property
name=
"filters"
value=
"stat"
/>
...
...
src_system/com/gaowj/system/login/CasAction.java
View file @
f215601a
package
com
.
gaowj
.
system
.
login
;
import
java.io.IOException
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
org.jasig.cas.client.authentication.AttributePrincipal
;
...
...
@@ -36,7 +38,10 @@ public class CasAction extends BasicAction {
Map
<
String
,
Object
>
query
=
new
HashMap
<
String
,
Object
>();
query
.
put
(
"EMID"
,
username
);
Map
<
String
,
Object
>
userInfoI
=
systemOpeBusiness
.
listLoginUserInfo
(
query
).
get
(
0
);
Map
<
String
,
Object
>
userInfoI
=
null
;
List
<
Map
<
String
,
Object
>>
listUser
=
systemOpeBusiness
.
listLoginUserInfo
(
query
);
if
(
listUser
.
size
()>
0
){
userInfoI
=
systemOpeBusiness
.
listLoginUserInfo
(
query
).
get
(
0
);
Map
<
String
,
Object
>
sessionUser
=
new
HashMap
<
String
,
Object
>();
String
u_all_m
=
systemOpeBusiness
.
getUserAllModule
(
userInfoI
.
get
(
"CODE"
).
toString
());
sessionUser
.
put
(
"CODE"
,
userInfoI
.
get
(
"CODE"
));
...
...
@@ -46,12 +51,14 @@ public class CasAction extends BasicAction {
sessionUser
.
put
(
"EMDEPART"
,
userInfoI
.
get
(
"EMDEPART"
));
sessionUser
.
put
(
"EMNAME"
,
userInfoI
.
get
(
"EMNAME"
));
sessionUser
.
put
(
"BEFORETIME"
,
userInfoI
.
get
(
"BEFORETIME"
));
sessionUser
.
put
(
"BEFORETIME"
,
jt
.
date3string
((
Date
)
userInfoI
.
get
(
"BEFORETIME"
)));
sessionUser
.
put
(
"SESSIONID"
,
request
.
getSession
().
getId
());
sessionUser
.
put
(
"CURRENTTIME"
,
jt
.
now_datetime
());
sessionUser
.
put
(
"LOGINIP"
,
request
.
getRemoteAddr
());
sessionUser
.
put
(
"SERVERIP"
,
request
.
getLocalAddr
());
sessionUser
.
put
(
"QUANXIAN"
,
u_all_m
);
sessionUser
.
put
(
"SESSIONUSER"
,
request
.
getSession
());
request
.
getSession
().
setAttribute
(
"userInfo"
,
sessionUser
);
//增加登陆日志
Map
<
String
,
Object
>
log
=
new
HashMap
<
String
,
Object
>();
...
...
@@ -60,6 +67,8 @@ public class CasAction extends BasicAction {
log
.
put
(
"OPETYPE"
,
"B/S登陆"
);
systemOpeBusiness
.
insert_log
(
log
);
}
}
String
strRedirecturl
=
request
.
getParameter
(
"redirectUrl"
);
String
toUrl
=
""
;
if
(
strRedirecturl
!=
null
&&
strRedirecturl
.
length
()
>
0
)
{
...
...
src_system/com/gaowj/uploadfile/actAction.java
View file @
f215601a
...
...
@@ -345,10 +345,11 @@ public class actAction extends BasicAction {
String
uuid
=
request
.
getParameter
(
"uuid"
);
String
uploadnew
=
request
.
getParameter
(
"uploadnew"
);
String
uploadpath
=
request
.
getParameter
(
"uploadpath"
);
String
downloadFilenameEncode1
=
PropUtil
.
getValue
(
"downloadFilenameEncode1"
,
"quartz_service"
,
"gbk"
);
String
downloadFilenameEncode2
=
PropUtil
.
getValue
(
"downloadFilenameEncode2"
,
"quartz_service"
,
"iso8859-1"
);
super
.
setEncoding1
(
downloadFilenameEncode1
);
super
.
setEncoding2
(
downloadFilenameEncode2
);
// String downloadFilenameEncode1 = PropUtil.getValue("downloadFilenameEncode1", "quartz_service", "gbk");
// String downloadFilenameEncode2 = PropUtil.getValue("downloadFilenameEncode2", "quartz_service", "iso8859-1");
// super.setEncoding1(downloadFilenameEncode1);
// super.setEncoding2(downloadFilenameEncode2);
response
.
setCharacterEncoding
(
"utf-8"
);
if
(
new
File
(
uploadpath
+
"/"
+
uploadnew
).
exists
()==
false
){
db2file
(
uuid
,
uploadpath
,
uploadnew
,
false
);
ret_download
=
super
.
download
();
...
...
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