Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
apollo
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openSource
apollo
Commits
7b41718c
Commit
7b41718c
authored
Jul 24, 2017
by
张乐
Committed by
GitHub
Jul 24, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #669 from nobodyiam/appid-with-dot
support appid with dot
parents
5f7f1d3b
43d037b5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
10 deletions
+5
-10
AppController.java
...amework/apollo/adminservice/controller/AppController.java
+3
-3
application.yml
apollo-assembly/src/main/resources/application.yml
+0
-5
AppController.java
...rip/framework/apollo/portal/controller/AppController.java
+2
-2
No files found.
apollo-adminservice/src/main/java/com/ctrip/framework/apollo/adminservice/controller/AppController.java
View file @
7b41718c
...
...
@@ -48,7 +48,7 @@ public class AppController {
return
dto
;
}
@RequestMapping
(
value
=
"/apps/{appId}"
,
method
=
RequestMethod
.
DELETE
)
@RequestMapping
(
value
=
"/apps/{appId
:.+
}"
,
method
=
RequestMethod
.
DELETE
)
public
void
delete
(
@PathVariable
(
"appId"
)
String
appId
,
@RequestParam
String
operator
)
{
App
entity
=
appService
.
findOne
(
appId
);
if
(
entity
==
null
)
{
...
...
@@ -57,7 +57,7 @@ public class AppController {
appService
.
delete
(
entity
.
getId
(),
operator
);
}
@RequestMapping
(
value
=
"/apps/{appId}"
,
method
=
RequestMethod
.
PUT
)
@RequestMapping
(
value
=
"/apps/{appId
:.+
}"
,
method
=
RequestMethod
.
PUT
)
public
void
update
(
@PathVariable
String
appId
,
@RequestBody
App
app
)
{
if
(!
Objects
.
equals
(
appId
,
app
.
getAppId
()))
{
throw
new
BadRequestException
(
"The App Id of path variable and request body is different"
);
...
...
@@ -78,7 +78,7 @@ public class AppController {
return
BeanUtils
.
batchTransform
(
AppDTO
.
class
,
app
);
}
@RequestMapping
(
value
=
"/apps/{appId}"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/apps/{appId
:.+
}"
,
method
=
RequestMethod
.
GET
)
public
AppDTO
get
(
@PathVariable
(
"appId"
)
String
appId
)
{
App
app
=
appService
.
findOne
(
appId
);
if
(
app
==
null
)
{
...
...
apollo-assembly/src/main/resources/application.yml
View file @
7b41718c
...
...
@@ -3,9 +3,4 @@ spring:
active
:
${apollo_profile}
logging
:
level
:
org.springframework.cloud
:
'
DEBUG'
file
:
/opt/logs/100003171/apollo-assembly.log
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/AppController.java
View file @
7b41718c
...
...
@@ -91,7 +91,7 @@ public class AppController {
}
@PreAuthorize
(
value
=
"@permissionValidator.isAppAdmin(#appId)"
)
@RequestMapping
(
value
=
"/{appId}"
,
method
=
RequestMethod
.
PUT
)
@RequestMapping
(
value
=
"/{appId
:.+
}"
,
method
=
RequestMethod
.
PUT
)
public
void
update
(
@PathVariable
String
appId
,
@RequestBody
AppModel
appModel
)
{
if
(!
Objects
.
equals
(
appId
,
appModel
.
getAppId
()))
{
throw
new
BadRequestException
(
"The App Id of path variable and request body is different"
);
...
...
@@ -136,7 +136,7 @@ public class AppController {
return
ResponseEntity
.
ok
().
build
();
}
@RequestMapping
(
value
=
"/{appId}"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/{appId
:.+
}"
,
method
=
RequestMethod
.
GET
)
public
App
load
(
@PathVariable
String
appId
)
{
return
appService
.
load
(
appId
);
...
...
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