Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
guns-vip
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
guns-vip
Commits
cd386b77
Commit
cd386b77
authored
Jul 19, 2017
by
naan1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复添加顶级部门和代码生成的bug
parent
39d2c2e3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
doc/多机环境部署注意事项.md
+2
-2
src/main/java/com/stylefeng/guns/core/template/engine/base/GunsTemplateEngine.java
+6
-1
src/main/java/com/stylefeng/guns/modular/system/controller/DeptController.java
+1
-1
No files found.
doc/多机环境部署注意事项.md
View file @
cd386b77
# 多机环
境部署注意事项
# 多机环
境部署注意事项
...
...
@@ -2,7 +2,7 @@
多机环境把session托管给redis存储,所以要部署和配置redis,另外需要注意的是开启相关配置
## 注意事项如下
1.
单机环境下不需要依赖spring-session,所以需要把相关依赖
改为compoile
1.
单机环境下不需要依赖spring-session,所以需要把相关依赖
的注释打开
```
<dependency>
<groupId>org.springframework.session</groupId>
...
...
src/main/java/com/stylefeng/guns/core/template/engine/base/GunsTemplateEngine.java
View file @
cd386b77
package
com
.
stylefeng
.
guns
.
core
.
template
.
engine
.
base
;
import
com.stylefeng.guns.core.util.ToolUtil
;
import
com.sun.javafx.PlatformUtil
;
import
org.beetl.core.Configuration
;
import
org.beetl.core.GroupTemplate
;
import
org.beetl.core.Template
;
...
...
@@ -53,7 +54,11 @@ public abstract class GunsTemplateEngine extends AbstractTemplateEngine {
public
void
generateFile
(
String
template
,
String
filePath
){
Template
pageTemplate
=
groupTemplate
.
getTemplate
(
template
);
configTemplate
(
pageTemplate
);
filePath
=
filePath
.
replaceAll
(
"\\\\"
,
File
.
separator
);
if
(
PlatformUtil
.
isLinux
()){
filePath
=
filePath
.
replaceAll
(
"/+|\\\\+"
,
"/"
);
}
else
{
filePath
=
filePath
.
replaceAll
(
"/+|\\\\+"
,
"\\\\"
);
}
File
file
=
new
File
(
filePath
);
File
parentFile
=
file
.
getParentFile
();
if
(!
parentFile
.
exists
()){
...
...
src/main/java/com/stylefeng/guns/modular/system/controller/DeptController.java
View file @
cd386b77
...
...
@@ -158,7 +158,7 @@ public class DeptController extends BaseController {
}
private
void
deptSetPids
(
Dept
dept
)
{
if
(
ToolUtil
.
isEmpty
(
dept
.
getPid
())
||
dept
.
getPid
().
equals
(
"0"
))
{
if
(
ToolUtil
.
isEmpty
(
dept
.
getPid
())
||
dept
.
getPid
().
equals
(
0
))
{
dept
.
setPid
(
0
);
dept
.
setPids
(
"[0],"
);
}
else
{
...
...
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