Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
aserver
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
15所TongWeb
aserver
Commits
67328186
Commit
67328186
authored
Jul 06, 2020
by
李德才
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加Redis 配置
将用户信息保存到Redis
parent
70921a95
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
89 additions
and
76 deletions
+89
-76
pom.xml
pom.xml
+68
-58
MainConfig.java
...in/java/com/archser/aserver/common/config/MainConfig.java
+5
-0
IndexController.java
.../java/com/archser/aserver/controller/IndexController.java
+0
-0
config-pro.properties
src/main/resources/config-pro.properties
+10
-10
config.properties
src/main/resources/config.properties
+6
-8
No files found.
pom.xml
View file @
67328186
...
@@ -27,20 +27,20 @@
...
@@ -27,20 +27,20 @@
</properties>
</properties>
<!-- 使用阿里 maven 库 -->
<!-- 使用阿里 maven 库 -->
<repositories>
<repositories>
<repository>
<repository>
<id>
nexus
</id>
<id>
nexus
</id>
<url>
http://nexus.archser.com:8081/repository/maven-public/
</url>
<url>
http://nexus.archser.com:8081/repository/maven-public/
</url>
<releases>
<releases>
<enabled>
true
</enabled>
<enabled>
true
</enabled>
</releases>
</releases>
<snapshots>
<snapshots>
<enabled>
true
</enabled>
<enabled>
true
</enabled>
<updatePolicy>
always
</updatePolicy>
<updatePolicy>
always
</updatePolicy>
<checksumPolicy>
fail
</checksumPolicy>
<checksumPolicy>
fail
</checksumPolicy>
</snapshots>
</snapshots>
</repository>
</repository>
</repositories>
</repositories>
<dependencies>
<dependencies>
<dependency>
<dependency>
...
@@ -71,10 +71,10 @@
...
@@ -71,10 +71,10 @@
</dependency>
</dependency>
<!-- WebSocket 支持 -->
<!-- WebSocket 支持 -->
<dependency>
<dependency>
<groupId>
io.undertow
</groupId>
<groupId>
io.undertow
</groupId>
<artifactId>
undertow-websockets-jsr
</artifactId>
<artifactId>
undertow-websockets-jsr
</artifactId>
<version>
2.0.16.Final
</version>
<version>
2.0.16.Final
</version>
</dependency>
</dependency>
<!-- 避免控制台输出如下提示信息: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
<!-- 避免控制台输出如下提示信息: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
...
@@ -88,7 +88,17 @@
...
@@ -88,7 +88,17 @@
</dependency>
</dependency>
<dependency>
<groupId>
redis.clients
</groupId>
<artifactId>
jedis
</artifactId>
<version>
2.9.0
</version>
</dependency>
<dependency>
<groupId>
de.ruedigermoeller
</groupId>
<artifactId>
fst
</artifactId>
<version>
2.50
</version>
</dependency>
<dependency>
<dependency>
<groupId>
com.alibaba
</groupId>
<groupId>
com.alibaba
</groupId>
...
@@ -121,30 +131,30 @@
...
@@ -121,30 +131,30 @@
<artifactId>
jjwt-jackson
</artifactId>
<artifactId>
jjwt-jackson
</artifactId>
<version>
${jjwt.version}
</version>
<version>
${jjwt.version}
</version>
</dependency>
</dependency>
<!-- webSocket 开始-->
<!-- webSocket 开始
-->
<dependency>
<dependency>
<groupId>
javax.websocket
</groupId>
<groupId>
javax.websocket
</groupId>
<artifactId>
javax.websocket-api
</artifactId>
<artifactId>
javax.websocket-api
</artifactId>
<version>
1.1
</version>
<version>
1.1
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
javax
</groupId>
<groupId>
javax
</groupId>
<artifactId>
javaee-api
</artifactId>
<artifactId>
javaee-api
</artifactId>
<version>
7.0
</version>
<version>
7.0
</version>
<scope>
provided
</scope>
<scope>
provided
</scope>
</dependency>
</dependency>
<!-- webSocket 结束-->
<!-- webSocket 结束
-->
<dependency>
<dependency>
<groupId>
org.apache.dubbo
</groupId>
<groupId>
org.apache.dubbo
</groupId>
...
@@ -161,25 +171,25 @@
...
@@ -161,25 +171,25 @@
</exclusion>
</exclusion>
</exclusions>
</exclusions>
</dependency>
</dependency>
<!-- 国密加密需要的依赖 -->
<!-- 国密加密需要的依赖 -->
<dependency>
<groupId>
org.bouncycastle
</groupId>
<artifactId>
bcprov-jdk15on
</artifactId>
<version>
1.60
</version>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
<dependency>
<dependency>
<groupId>
commons-io
</groupId>
<groupId>
org.bouncycastle
</groupId>
<artifactId>
commons-io
</artifactId>
<artifactId>
bcprov-jdk15on
</artifactId>
<version>
2.4
</version>
<version>
1.60
</version>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
<dependency>
<groupId>
commons-io
</groupId>
<artifactId>
commons-io
</artifactId>
<version>
2.4
</version>
</dependency>
</dependency>
<!-- 对接单点登录调用的依赖 -->
<!-- 对接单点登录调用的依赖 -->
<dependency>
<dependency>
<groupId>
com.spbportal.sso
</groupId>
<groupId>
com.spbportal.sso
</groupId>
<artifactId>
spbportal-ssoClient-test
</artifactId>
<artifactId>
spbportal-ssoClient-test
</artifactId>
<version>
1.0
</version>
<version>
1.0
</version>
</dependency>
</dependency>
<!--自选库 -->
<!--自选库 -->
<dependency>
<dependency>
<groupId>
com.jfinal
</groupId>
<groupId>
com.jfinal
</groupId>
...
@@ -192,14 +202,14 @@
...
@@ -192,14 +202,14 @@
<version>
8.1.1.30
</version>
<version>
8.1.1.30
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.jdom
</groupId>
<groupId>
org.jdom
</groupId>
<artifactId>
jdom
</artifactId>
<artifactId>
jdom
</artifactId>
<version>
1.1
</version>
<version>
1.1
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
jaxen
</groupId>
<groupId>
jaxen
</groupId>
<artifactId>
jaxen
</artifactId>
<artifactId>
jaxen
</artifactId>
<version>
1.1.1
</version>
<version>
1.1.1
</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
...
...
src/main/java/com/archser/aserver/common/config/MainConfig.java
View file @
67328186
...
@@ -29,6 +29,7 @@ import com.jfinal.plugin.activerecord.ActiveRecordPlugin;
...
@@ -29,6 +29,7 @@ import com.jfinal.plugin.activerecord.ActiveRecordPlugin;
import
com.jfinal.plugin.activerecord.CaseInsensitiveContainerFactory
;
import
com.jfinal.plugin.activerecord.CaseInsensitiveContainerFactory
;
import
com.jfinal.plugin.activerecord.dialect.OracleDialect
;
import
com.jfinal.plugin.activerecord.dialect.OracleDialect
;
import
com.jfinal.plugin.druid.DruidPlugin
;
import
com.jfinal.plugin.druid.DruidPlugin
;
import
com.jfinal.plugin.redis.RedisPlugin
;
import
com.jfinal.render.ViewType
;
import
com.jfinal.render.ViewType
;
import
com.jfinal.server.undertow.UndertowServer
;
import
com.jfinal.server.undertow.UndertowServer
;
import
com.jfinal.server.undertow.WebBuilder
;
import
com.jfinal.server.undertow.WebBuilder
;
...
@@ -129,6 +130,10 @@ public class MainConfig extends JFinalConfig {
...
@@ -129,6 +130,10 @@ public class MainConfig extends JFinalConfig {
// 添加到插件列表中
// 添加到插件列表中
me
.
add
(
dbPlugin
);
me
.
add
(
dbPlugin
);
me
.
add
(
arp
);
me
.
add
(
arp
);
// 添加Redis 配置
RedisPlugin
redis
=
new
RedisPlugin
(
"redis"
,
PropKit
.
get
(
"redis.url"
),
PropKit
.
get
(
"redis.password"
));
me
.
add
(
redis
);
}
}
...
...
src/main/java/com/archser/aserver/controller/IndexController.java
View file @
67328186
This diff is collapsed.
Click to expand it.
src/main/resources/config-pro.properties
View file @
67328186
dbType
=
DM
dbType
=
DM
jdbcUrl
=
jdbc:dm://
39.104.28.145
:5236
jdbcUrl
=
jdbc:dm://
192.168.31.18
:5236
jdbc.driver
=
dm.jdbc.driver.DmDriver
jdbc.driver
=
dm.jdbc.driver.DmDriver
user
=
archser
_yz
user
=
archser
password
=
archser_
yz
password
=
archser_
123
basic.url
=
http://
39.104.28.145
:11028
basic.url
=
http://
192.168.31.18
:11028
devMode
=
true
devMode
=
true
engineDevMode
=
true
engineDevMode
=
true
authUrl
=
http://125.77.26.133:7001/auth/token
userInfoUrl
=
http://125.77.26.133:7001/api/info/user_info
redis.url
=
192.168.31.18
redi
rect_uri
=
http://192.168.31.17:8080/
redi
s.password
=
archser_redis
# --- 消息中心websocket配置 ---
# --- 消息中心websocket配置 ---
## 定时发送消息的周期 单位毫秒
## 定时发送消息的周期 单位毫秒
messageWsDelay
=
5000
messageWsDelay
=
5000
0
## 延期,第二次发送消息的延期时间,第一次发送在开始连接时就会发送 单位毫秒
## 延期,第二次发送消息的延期时间,第一次发送在开始连接时就会发送 单位毫秒
messageWsPeriod
=
5000
messageWsPeriod
=
5000
0
## 消息发送成功后,等待客户端反馈时间,超出此时间表示连接已经断开,会关闭连接 单位毫秒
## 消息发送成功后,等待客户端反馈时间,超出此时间表示连接已经断开,会关闭连接 单位毫秒
messageWsTimeout
=
30000
messageWsTimeout
=
30000
## 是否开启消息中心的websocket
## 是否开启消息中心的websocket
openMessageWebSocket
=
true
openMessageWebSocket
=
true
MyIpAddress
=
127.0.0.1,
39.104.28.145
MyIpAddress
=
127.0.0.1,
192.168.31.18
src/main/resources/config.properties
View file @
67328186
...
@@ -9,23 +9,21 @@ dbType=DM
...
@@ -9,23 +9,21 @@ dbType=DM
jdbcUrl
=
jdbc:dm://192.168.31.119:5236
jdbcUrl
=
jdbc:dm://192.168.31.119:5236
jdbc.driver
=
dm.jdbc.driver.DmDriver
jdbc.driver
=
dm.jdbc.driver.DmDriver
user
=
archser
_yz
user
=
archser
password
=
archser_
yz
password
=
archser_
123
basic.url
=
http://192.168.31.119:11028
basic.url
=
http://192.168.31.119:11028
devMode
=
true
devMode
=
true
engineDevMode
=
true
engineDevMode
=
true
redis.url
=
192.168.31.18
authUrl
=
http://125.77.26.133:7001/auth/token
redis.password
=
archser_redis
userInfoUrl
=
http://125.77.26.133:7001/api/info/user_info
redirect_uri
=
http://192.168.31.17:8080/
# --- \u6D88\u606F\u4E2D\u5FC3websocket\u914D\u7F6E ---
# --- \u6D88\u606F\u4E2D\u5FC3websocket\u914D\u7F6E ---
## \u5B9A\u65F6\u53D1\u9001\u6D88\u606F\u7684\u5468\u671F \u5355\u4F4D\u6BEB\u79D2
## \u5B9A\u65F6\u53D1\u9001\u6D88\u606F\u7684\u5468\u671F \u5355\u4F4D\u6BEB\u79D2
messageWsDelay
=
5000
messageWsDelay
=
5000
0
## \u5EF6\u671F\uFF0C\u7B2C\u4E8C\u6B21\u53D1\u9001\u6D88\u606F\u7684\u5EF6\u671F\u65F6\u95F4\uFF0C\u7B2C\u4E00\u6B21\u53D1\u9001\u5728\u5F00\u59CB\u8FDE\u63A5\u65F6\u5C31\u4F1A\u53D1\u9001 \u5355\u4F4D\u6BEB\u79D2
## \u5EF6\u671F\uFF0C\u7B2C\u4E8C\u6B21\u53D1\u9001\u6D88\u606F\u7684\u5EF6\u671F\u65F6\u95F4\uFF0C\u7B2C\u4E00\u6B21\u53D1\u9001\u5728\u5F00\u59CB\u8FDE\u63A5\u65F6\u5C31\u4F1A\u53D1\u9001 \u5355\u4F4D\u6BEB\u79D2
messageWsPeriod
=
5000
messageWsPeriod
=
5000
0
## \u6D88\u606F\u53D1\u9001\u6210\u529F\u540E\uFF0C\u7B49\u5F85\u5BA2\u6237\u7AEF\u53CD\u9988\u65F6\u95F4\uFF0C\u8D85\u51FA\u6B64\u65F6\u95F4\u8868\u793A\u8FDE\u63A5\u5DF2\u7ECF\u65AD\u5F00\uFF0C\u4F1A\u5173\u95ED\u8FDE\u63A5 \u5355\u4F4D\u6BEB\u79D2
## \u6D88\u606F\u53D1\u9001\u6210\u529F\u540E\uFF0C\u7B49\u5F85\u5BA2\u6237\u7AEF\u53CD\u9988\u65F6\u95F4\uFF0C\u8D85\u51FA\u6B64\u65F6\u95F4\u8868\u793A\u8FDE\u63A5\u5DF2\u7ECF\u65AD\u5F00\uFF0C\u4F1A\u5173\u95ED\u8FDE\u63A5 \u5355\u4F4D\u6BEB\u79D2
messageWsTimeout
=
30000
messageWsTimeout
=
30000
## \u662F\u5426\u5F00\u542F\u6D88\u606F\u4E2D\u5FC3\u7684websocket
## \u662F\u5426\u5F00\u542F\u6D88\u606F\u4E2D\u5FC3\u7684websocket
...
...
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