Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
50e4ec72
Commit
50e4ec72
authored
Jan 31, 2019
by
Junling Bu
Browse files
chore[litemall-admin-api]: controller的方法里面不使用RequestMapping, 而是GetMapping或者PostMapping.
parent
870cf95e
Changes
2
Hide whitespace changes
Inline
Side-by-side
litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/web/AdminAdController.java
View file @
50e4ec72
...
...
@@ -30,7 +30,7 @@ public class AdminAdController {
@RequiresPermissions
(
"admin:ad:list"
)
@RequiresPermissionsDesc
(
menu
={
"推广管理"
,
"广告管理"
},
button
=
"查询"
)
@
Reques
tMapping
(
"/list"
)
@
Ge
tMapping
(
"/list"
)
public
Object
list
(
String
name
,
String
content
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
page
,
@RequestParam
(
defaultValue
=
"10"
)
Integer
limit
,
...
...
litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/web/AdminIndexController.java
View file @
50e4ec72
...
...
@@ -5,6 +5,8 @@ import org.apache.commons.logging.LogFactory;
import
org.apache.shiro.authz.annotation.*
;
import
org.linlinjava.litemall.admin.annotation.RequiresPermissionsDesc
;
import
org.linlinjava.litemall.core.util.ResponseUtil
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -50,14 +52,14 @@ public class AdminIndexController {
@RequiresPermissions
(
"index:permission:read"
)
@RequiresPermissionsDesc
(
menu
={
"其他"
,
"权限测试"
},
button
=
"权限读"
)
@
Reques
tMapping
(
"/read"
)
@
Ge
tMapping
(
"/read"
)
public
Object
read
()
{
return
ResponseUtil
.
ok
(
"hello world, this is admin service"
);
}
@RequiresPermissions
(
"index:permission:write"
)
@RequiresPermissionsDesc
(
menu
={
"其他"
,
"权限测试"
},
button
=
"权限写"
)
@
Reque
stMapping
(
"/write"
)
@
Po
stMapping
(
"/write"
)
public
Object
write
()
{
return
ResponseUtil
.
ok
(
"hello world, this is admin service"
);
}
...
...
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