Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nouiWithSpringMVC
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
gechengyang
nouiWithSpringMVC
Commits
a20df4c4
Commit
a20df4c4
authored
Oct 04, 2020
by
WeiCong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
由于资源从项目只移出,因此调整电证前置资源获取方式
parent
b1384b46
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
144 additions
and
126 deletions
+144
-126
ResourceAccessFilter.java
...rg/sss/presentation/noui/filter/ResourceAccessFilter.java
+13
-2
NoUiUtils.java
src/main/java/org/sss/presentation/noui/util/NoUiUtils.java
+5
-0
eIBS.xml
src/main/resources/eIBS.xml
+126
-124
No files found.
src/main/java/org/sss/presentation/noui/filter/ResourceAccessFilter.java
View file @
a20df4c4
...
...
@@ -2,14 +2,17 @@ package org.sss.presentation.noui.filter;
import
log.Log
;
import
log.LogFactory
;
import
org.apache.commons.io.FileUtils
;
import
org.apache.commons.io.IOUtils
;
import
org.sss.presentation.noui.jwt.RedisLoginInfo
;
import
org.sss.presentation.noui.util.NoUiUtils
;
import
org.sss.presentation.noui.util.RedisUtil
;
import
org.sss.presentation.noui.util.StringUtil
;
import
javax.servlet.*
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.InputStream
;
...
...
@@ -85,8 +88,16 @@ public class ResourceAccessFilter implements Filter {
}
}
res
=
res
.
substring
(
res
.
indexOf
(
pdfres
),
res
.
length
());
pdfWriter
(
request
.
getSession
().
getServletContext
().
getResourceAsStream
(
res
),
response
);
return
false
;
StringBuilder
sb
=
new
StringBuilder
(
NoUiUtils
.
getDatapath
());
sb
.
append
(
res
);
File
file
=
new
File
(
sb
.
toString
());
if
(
file
.
exists
()){
pdfWriter
(
FileUtils
.
openInputStream
(
file
),
response
);
return
false
;
}
else
{
log
.
warn
(
"Data Is Not Exists"
);
return
forbiddenPdf
(
request
,
response
);
}
}
private
boolean
isLegalSec
(
String
sec
,
String
uid
,
String
res
,
HttpServletRequest
request
)
throws
Exception
{
...
...
src/main/java/org/sss/presentation/noui/util/NoUiUtils.java
View file @
a20df4c4
...
...
@@ -41,6 +41,7 @@ public class NoUiUtils {
public
static
String
serviceDbName
;
public
static
int
STP
=
50
;
public
static
boolean
fieldencode
=
false
;
public
static
String
datapath
;
private
static
final
ThreadGroup
threadGroup
=
new
ThreadGroup
(
"eIBS"
);
...
...
@@ -171,4 +172,8 @@ public class NoUiUtils {
{
return
safeCode
.
equals
(
genSafeCode
(
keyParams
));
}
public
static
String
getDatapath
()
{
return
datapath
;
}
}
src/main/resources/eIBS.xml
View file @
a20df4c4
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!-- <service class="org.sss.util.ContainerUtils" initMethodName="init" deinitMethodName="deinit">
交易DAT文件是否采用压缩
<property name="isCompressed" value="false" class="boolean" />
日志系统是否通过JSON进行格式化
<property name="jsonUsed" value="false" class="boolean" />
是否采用集群通过本地MQ进行文件同步(FILE_SVR/FILE_QM/SEND_O_FILE/RECV_I_FILE)
<property name="clusterUsed" value="false" class="boolean" />
<property name="queueHostName" value="127.0.0.1" />
<property name="remoteHostName" value="192.168.0.178" />
<property name="queuePort" value="1419" class="int" />
是否让平台主动进行Java的GC收集
<property name="autoGC" value="true" class="boolean" />
</service> -->
<!--
<service class="cn.com.brilliance.eibs.auth.LdapLoginContext">
<property name="ldapServer" value="192.1.1.9" />
<property name="ldapPort" value="389" class="int" />
<property name="ldapBaseDN" value="dc=brilliance,dc=com" />
<property name="ldapAttributeName" value="uid" />
</service>
-->
<service
class=
"org.sss.module.hibernate.HibernateUtils"
initMethodName=
"init"
deinitMethodName=
"deinit"
>
<!-- 生成代码基本包名(不可修改) -->
<!-- 生成数据库脚本(设置全路径或相对路径,生成出来作为参考,为空则不生成) -->
<property
name=
"scriptFile"
value=
""
/>
<!-- 自动重建数据库表 -->
<property
name=
"autoCreate"
value=
"false"
class=
"boolean"
/>
<!-- 设置默认查询最大读取数(0为无限制) -->
<property
name=
"maxFetchSize"
value=
"5000"
class=
"int"
/>
<!-- 是否使用sequence(目前仅支持Oracle/DB2/PostgreSQL) -->
<property
name=
"sequenceUsed"
value=
"false"
class=
"boolean"
/>
<!-- 是否忽略dbFetch时的错误,用于兼容旧程序fetch不存在列返回空的处理 -->
<property
name=
"ignoreFetchError"
value=
"false"
class=
"boolean"
/>
<!-- sequence的命名前缀 -->
<property
name=
"sequencePrefix"
value=
"seq_"
/>
</service>
<!-- <service class="org.sss.presentation.zk.ZkDisplayUtils">
<property name="unit" value="px" />
<property name="leftOffset" value="5" class="int" />
<property name="topOffset" value="55" class="int" />
</service> -->
<service
class=
"org.sss.presentation.noui.util.NoUiUtils"
initMethodName=
"init"
deinitMethodName=
"deinit"
>
<property
name=
"fieldencode"
value=
"true"
class=
"boolean"
/>
<property
name=
"connectKeeped"
value=
"true"
class=
"boolean"
/>
<property
name=
"debugMode"
value=
"false"
class=
"boolean"
/>
<!-- WAR包本身的目录为变量$ROOT,WAR/WEB-INF/classes目录为变量$HOME -->
<property
name=
"rootPath"
value=
"$ROOT"
/>
<!-- 外部资源目录
<property name="resourcePath" value="$ROOT/upload" /> -->
<!-- 代码转换的实现(可替换,但必须实现ICodetable接口) -->
<property
name=
"tbl"
class=
"org.sss.common.impl.CodetableImpl"
methodName=
"getInstance"
>
<property
name=
"homePath"
value=
"$HOME"
direct=
"false"
/>
</property>
<!-- 国际化的实现(可替换,但必须实现II18n接口) -->
<property
name=
"i18n"
class=
"org.sss.common.impl.I18nImpl"
/>
<!-- 密码编解码的实现(可替换,但必须实现IFilter接口) -->
<property
name=
"passwordFilter"
class=
"org.sss.presentation.noui.filter.PasswordSM2Filter"
/>
<!-- Module工厂实现(不可替换) -->
<property
name=
"factory"
class=
"org.sss.module.hibernate.ModuleSessionFactory"
/>
<!-- 后台应用服务启动用户名 -->
<property
name=
"userName"
value=
"bgUser"
/>
<!-- 后台应用服务中断重启间隙时间(单位:毫秒) -->
<property
name=
"millis"
value=
"5000"
class=
"long"
/>
<!-- 后台应用服务超时时间(单位:毫秒) -->
<property
name=
"timeout"
value=
"600000"
class=
"long"
/>
<!-- 关闭时等待后台应用服务退出时间(单位:毫秒) -->
<property
name=
"waitExit"
value=
"60000"
class=
"long"
/>
<!-- 服务列表(以逗号隔开多个服务名,服务名前加下划线忽略后台应用服务超时时间) -->
<property
name=
"serviceNames"
value=
""
class=
"java.lang.String[]"
/>
<property
name=
"userNames"
value=
"bgUser1,bgUser2"
class=
"java.lang.String[]"
/>
<property
name=
"millises"
value=
"60000,5000"
class=
"long[]"
/>
<property
name=
"timeouts"
value=
"600000,600000"
class=
"long[]"
/>
</service>
<!-- <service class="org.sss.presentation.zk.ZkUtils" initMethodName="init" deinitMethodName="deinit">
切换交易是否自动更新整个页面
<property name="autoRefresh" value="true" class="boolean" />
模型仅匹配唯一的UI控件
<property name="distinctID" value="true" class="boolean" />
页面访问是否可缓存
<property name="noCache" value="true" class="boolean" />
应用是否固定标题
<property name="fixTitle" value="false" class="boolean" />
多页面支持时是否固定标题/不随交易变化
<property name="fixTabTitle" value="false" class="boolean" />
通过Enter切换输入焦点
<property name="nextByEnter" value="false" class="boolean" />
交易访问是否做控制
<property name="checkAccess" value="false" class="boolean" />
多页面形式时最大可开数量
<property name="maxTabCount" value="5" class="int" />
是否为调试状态
<property name="debugMode" value="false" class="boolean" />
是否为压力测试状态
<property name="batchTesting" value="false" class="boolean" />
WAR包本身的目录为变量$ROOT,WAR/WEB-INF/classes目录为变量$HOME
<property name="rootPath" value="$ROOT" />
外部资源目录
<property name="resourcePath" value="$ROOT/upload" />
代码转换的实现(可替换,但必须实现ICodetable接口)
<property name="tbl" class="org.sss.common.impl.CodetableImpl" methodName="getInstance">
<property name="homePath" value="$HOME" direct="false" />
</property>
国际化的实现(可替换,但必须实现II18n接口)
<property name="i18n" class="org.sss.common.impl.I18nImpl" />
密码编解码的实现(可替换,但必须实现IFilter接口)
<property name="passwordFilter" class="org.sss.common.impl.PasswordFilter" />
Module工厂实现(不可替换)
<property name="factory" class="org.sss.module.hibernate.ModuleSessionFactory" />
后台应用服务启动用户名
<property name="userName" value="bgUser" />
后台应用服务中断重启间隙时间(单位:毫秒)
<property name="millis" value="5000" class="long" />
后台应用服务超时时间(单位:毫秒)
<property name="timeout" value="600000" class="long" />
关闭时等待后台应用服务退出时间(单位:毫秒)
<property name="waitExit" value="60000" class="long" />
服务列表(以逗号隔开多个服务名,服务名前加下划线忽略后台应用服务超时时间)
<property name="serviceNames" value="" class="java.lang.String[]" />
<property name="userNames" value="bgUser1,bgUser2" class="java.lang.String[]" />
<property name="millises" value="5000,5000" class="long[]" />
<property name="timeouts" value="600000,600000" class="long[]" />
</service> -->
<!-- <service class="org.sss.util.ContainerUtils" initMethodName="init" deinitMethodName="deinit">
交易DAT文件是否采用压缩
<property name="isCompressed" value="false" class="boolean" />
日志系统是否通过JSON进行格式化
<property name="jsonUsed" value="false" class="boolean" />
是否采用集群通过本地MQ进行文件同步(FILE_SVR/FILE_QM/SEND_O_FILE/RECV_I_FILE)
<property name="clusterUsed" value="false" class="boolean" />
<property name="queueHostName" value="127.0.0.1" />
<property name="remoteHostName" value="192.168.0.178" />
<property name="queuePort" value="1419" class="int" />
是否让平台主动进行Java的GC收集
<property name="autoGC" value="true" class="boolean" />
</service> -->
<!--
<service class="cn.com.brilliance.eibs.auth.LdapLoginContext">
<property name="ldapServer" value="192.1.1.9" />
<property name="ldapPort" value="389" class="int" />
<property name="ldapBaseDN" value="dc=brilliance,dc=com" />
<property name="ldapAttributeName" value="uid" />
</service>
-->
<service
class=
"org.sss.module.hibernate.HibernateUtils"
initMethodName=
"init"
deinitMethodName=
"deinit"
>
<!-- 生成代码基本包名(不可修改) -->
<!-- 生成数据库脚本(设置全路径或相对路径,生成出来作为参考,为空则不生成) -->
<property
name=
"scriptFile"
value=
""
/>
<!-- 自动重建数据库表 -->
<property
name=
"autoCreate"
value=
"false"
class=
"boolean"
/>
<!-- 设置默认查询最大读取数(0为无限制) -->
<property
name=
"maxFetchSize"
value=
"5000"
class=
"int"
/>
<!-- 是否使用sequence(目前仅支持Oracle/DB2/PostgreSQL) -->
<property
name=
"sequenceUsed"
value=
"false"
class=
"boolean"
/>
<!-- 是否忽略dbFetch时的错误,用于兼容旧程序fetch不存在列返回空的处理 -->
<property
name=
"ignoreFetchError"
value=
"false"
class=
"boolean"
/>
<!-- sequence的命名前缀 -->
<property
name=
"sequencePrefix"
value=
"seq_"
/>
</service>
<!-- <service class="org.sss.presentation.zk.ZkDisplayUtils">
<property name="unit" value="px" />
<property name="leftOffset" value="5" class="int" />
<property name="topOffset" value="55" class="int" />
</service> -->
<service
class=
"org.sss.presentation.noui.util.NoUiUtils"
initMethodName=
"init"
deinitMethodName=
"deinit"
>
<property
name=
"datapath"
value=
"F:/brilliance/jkpt-pj/CNCC"
/>
<property
name=
"fieldencode"
value=
"true"
class=
"boolean"
/>
<property
name=
"connectKeeped"
value=
"true"
class=
"boolean"
/>
<property
name=
"debugMode"
value=
"false"
class=
"boolean"
/>
<!-- WAR包本身的目录为变量$ROOT,WAR/WEB-INF/classes目录为变量$HOME -->
<property
name=
"rootPath"
value=
"$ROOT"
/>
<!-- 外部资源目录
<property name="resourcePath" value="$ROOT/upload" /> -->
<!-- 代码转换的实现(可替换,但必须实现ICodetable接口) -->
<property
name=
"tbl"
class=
"org.sss.common.impl.CodetableImpl"
methodName=
"getInstance"
>
<property
name=
"homePath"
value=
"$HOME"
direct=
"false"
/>
</property>
<!-- 国际化的实现(可替换,但必须实现II18n接口) -->
<property
name=
"i18n"
class=
"org.sss.common.impl.I18nImpl"
/>
<!-- 密码编解码的实现(可替换,但必须实现IFilter接口) -->
<property
name=
"passwordFilter"
class=
"org.sss.presentation.noui.filter.PasswordSM2Filter"
/>
<!-- Module工厂实现(不可替换) -->
<property
name=
"factory"
class=
"org.sss.module.hibernate.ModuleSessionFactory"
/>
<!-- 后台应用服务启动用户名 -->
<property
name=
"userName"
value=
"bgUser"
/>
<!-- 后台应用服务中断重启间隙时间(单位:毫秒) -->
<property
name=
"millis"
value=
"5000"
class=
"long"
/>
<!-- 后台应用服务超时时间(单位:毫秒) -->
<property
name=
"timeout"
value=
"600000"
class=
"long"
/>
<!-- 关闭时等待后台应用服务退出时间(单位:毫秒) -->
<property
name=
"waitExit"
value=
"60000"
class=
"long"
/>
<!-- 服务列表(以逗号隔开多个服务名,服务名前加下划线忽略后台应用服务超时时间) -->
<property
name=
"serviceNames"
value=
""
class=
"java.lang.String[]"
/>
<property
name=
"userNames"
value=
"bgUser1,bgUser2"
class=
"java.lang.String[]"
/>
<property
name=
"millises"
value=
"60000,5000"
class=
"long[]"
/>
<property
name=
"timeouts"
value=
"600000,600000"
class=
"long[]"
/>
</service>
<!-- <service class="org.sss.presentation.zk.ZkUtils" initMethodName="init" deinitMethodName="deinit">
切换交易是否自动更新整个页面
<property name="autoRefresh" value="true" class="boolean" />
模型仅匹配唯一的UI控件
<property name="distinctID" value="true" class="boolean" />
页面访问是否可缓存
<property name="noCache" value="true" class="boolean" />
应用是否固定标题
<property name="fixTitle" value="false" class="boolean" />
多页面支持时是否固定标题/不随交易变化
<property name="fixTabTitle" value="false" class="boolean" />
通过Enter切换输入焦点
<property name="nextByEnter" value="false" class="boolean" />
交易访问是否做控制
<property name="checkAccess" value="false" class="boolean" />
多页面形式时最大可开数量
<property name="maxTabCount" value="5" class="int" />
是否为调试状态
<property name="debugMode" value="false" class="boolean" />
是否为压力测试状态
<property name="batchTesting" value="false" class="boolean" />
WAR包本身的目录为变量$ROOT,WAR/WEB-INF/classes目录为变量$HOME
<property name="rootPath" value="$ROOT" />
外部资源目录
<property name="resourcePath" value="$ROOT/upload" />
代码转换的实现(可替换,但必须实现ICodetable接口)
<property name="tbl" class="org.sss.common.impl.CodetableImpl" methodName="getInstance">
<property name="homePath" value="$HOME" direct="false" />
</property>
国际化的实现(可替换,但必须实现II18n接口)
<property name="i18n" class="org.sss.common.impl.I18nImpl" />
密码编解码的实现(可替换,但必须实现IFilter接口)
<property name="passwordFilter" class="org.sss.common.impl.PasswordFilter" />
Module工厂实现(不可替换)
<property name="factory" class="org.sss.module.hibernate.ModuleSessionFactory" />
后台应用服务启动用户名
<property name="userName" value="bgUser" />
后台应用服务中断重启间隙时间(单位:毫秒)
<property name="millis" value="5000" class="long" />
后台应用服务超时时间(单位:毫秒)
<property name="timeout" value="600000" class="long" />
关闭时等待后台应用服务退出时间(单位:毫秒)
<property name="waitExit" value="60000" class="long" />
服务列表(以逗号隔开多个服务名,服务名前加下划线忽略后台应用服务超时时间)
<property name="serviceNames" value="" class="java.lang.String[]" />
<property name="userNames" value="bgUser1,bgUser2" class="java.lang.String[]" />
<property name="millises" value="5000,5000" class="long[]" />
<property name="timeouts" value="600000,600000" class="long[]" />
</service> -->
</configuration>
\ 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