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
a627a4c7
Commit
a627a4c7
authored
Mar 18, 2021
by
李德才
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
恢复顺序
parent
5a90bfe3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
MainConfig.java
...in/java/com/archser/aserver/common/config/MainConfig.java
+14
-14
No files found.
src/main/java/com/archser/aserver/common/config/MainConfig.java
View file @
a627a4c7
...
...
@@ -168,24 +168,15 @@ public class MainConfig extends JFinalConfig {
arp
.
setDialect
(
DialectFactory
.
getDialect
());
arp
.
addSqlTemplate
(
"oracle.sql"
);
/******** 在此添加数据库 表-Model 映射 *********/
// 如果使用了JFinal Model 生成器 生成了BaseModel 把下面注释解开即可
_MappingKit
.
mapping
(
arp
);
// 添加到插件列表中
me
.
add
(
dbPlugin
);
me
.
add
(
arp
);
String
dbType
=
p
.
get
(
"dbType"
);
if
(
dbType
==
null
||
""
.
equals
(
dbType
.
trim
()))
{
System
.
out
.
println
(
"数据库配置文件中dbType不能为空值"
);
return
;
}
dbType
=
dbType
.
trim
();
dbType
=
dbType
.
toUpperCase
();
String
configPath
=
PathKit
.
getRootClassPath
()
+
"/DBUpdate/"
;
DBService
dbService
=
new
DBService
();
dbService
.
upgrade
(
configPath
,
dbType
);
// 配置Redis信息,自动判断单实例和集群并加入JFinal插件列表
new
RedisConfig
(
me
,
p
);
// 如果使用了JFinal Model 生成器 生成了BaseModel 把下面注释解开即可
_MappingKit
.
mapping
(
arp
);
// 添加定时任务
me
.
add
(
new
Cron4jPlugin
(
PropKit
.
append
(
"task.properties"
)));
}
...
...
@@ -218,7 +209,16 @@ public class MainConfig extends JFinalConfig {
*/
@Override
public
void
onStart
()
{
String
dbType
=
p
.
get
(
"dbType"
);
if
(
dbType
==
null
||
""
.
equals
(
dbType
.
trim
()))
{
System
.
out
.
println
(
"数据库配置文件中dbType不能为空值"
);
return
;
}
dbType
=
dbType
.
trim
();
dbType
=
dbType
.
toUpperCase
();
String
configPath
=
PathKit
.
getRootClassPath
()
+
"/DBUpdate/"
;
DBService
dbService
=
new
DBService
();
dbService
.
upgrade
(
configPath
,
dbType
);
new
GoodSync
().
run
();
}
...
...
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