Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
git test
Jpress
Commits
ea8927d9
Commit
ea8927d9
authored
6 years ago
by
fuhai999@gmail.com
Browse files
Options
Download
Email Patches
Plain Diff
v2.0-rc.9
parent
718613eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
jpress-core/src/main/java/io/jpress/web/base/ControllerBase.java
+17
-1
...core/src/main/java/io/jpress/web/base/ControllerBase.java
with
17 additions
and
1 deletion
+17
-1
jpress-core/src/main/java/io/jpress/web/base/ControllerBase.java
+
17
-
1
View file @
ea8927d9
...
...
@@ -22,6 +22,9 @@ import io.jboot.web.controller.JbootController;
import
io.jpress.JPressConsts
;
import
io.jpress.model.User
;
import
java.util.Enumeration
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Set
;
/**
...
...
@@ -40,11 +43,24 @@ public abstract class ControllerBase extends JbootController {
//renderError 会直接抛出异常,阻止程序往下执行
renderError
(
404
);
}
return
id
;
}
@NotAction
public
Map
<
String
,
String
>
getParas
(){
Map
<
String
,
String
>
map
=
null
;
Enumeration
<
String
>
names
=
getParaNames
();
if
(
names
!=
null
){
map
=
new
HashMap
<>();
while
(
names
.
hasMoreElements
()){
String
name
=
names
.
nextElement
();
map
.
put
(
name
,
getPara
(
name
));
}
}
return
map
;
}
protected
void
render404If
(
boolean
condition
){
if
(
condition
)
renderError
(
404
);
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
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
Menu
Projects
Groups
Snippets
Help