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
43d037b5
Commit
43d037b5
authored
Jul 23, 2017
by
nobodyiam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support appid with dot
parent
5f7f1d3b
Show 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 @
43d037b5
...
@@ -48,7 +48,7 @@ public class AppController {
...
@@ -48,7 +48,7 @@ public class AppController {
return
dto
;
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
)
{
public
void
delete
(
@PathVariable
(
"appId"
)
String
appId
,
@RequestParam
String
operator
)
{
App
entity
=
appService
.
findOne
(
appId
);
App
entity
=
appService
.
findOne
(
appId
);
if
(
entity
==
null
)
{
if
(
entity
==
null
)
{
...
@@ -57,7 +57,7 @@ public class AppController {
...
@@ -57,7 +57,7 @@ public class AppController {
appService
.
delete
(
entity
.
getId
(),
operator
);
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
)
{
public
void
update
(
@PathVariable
String
appId
,
@RequestBody
App
app
)
{
if
(!
Objects
.
equals
(
appId
,
app
.
getAppId
()))
{
if
(!
Objects
.
equals
(
appId
,
app
.
getAppId
()))
{
throw
new
BadRequestException
(
"The App Id of path variable and request body is different"
);
throw
new
BadRequestException
(
"The App Id of path variable and request body is different"
);
...
@@ -78,7 +78,7 @@ public class AppController {
...
@@ -78,7 +78,7 @@ public class AppController {
return
BeanUtils
.
batchTransform
(
AppDTO
.
class
,
app
);
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
)
{
public
AppDTO
get
(
@PathVariable
(
"appId"
)
String
appId
)
{
App
app
=
appService
.
findOne
(
appId
);
App
app
=
appService
.
findOne
(
appId
);
if
(
app
==
null
)
{
if
(
app
==
null
)
{
...
...
apollo-assembly/src/main/resources/application.yml
View file @
43d037b5
...
@@ -3,9 +3,4 @@ spring:
...
@@ -3,9 +3,4 @@ spring:
active
:
${apollo_profile}
active
:
${apollo_profile}
logging
:
logging
:
level
:
org.springframework.cloud
:
'
DEBUG'
file
:
/opt/logs/100003171/apollo-assembly.log
file
:
/opt/logs/100003171/apollo-assembly.log
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/AppController.java
View file @
43d037b5
...
@@ -91,7 +91,7 @@ public class AppController {
...
@@ -91,7 +91,7 @@ public class AppController {
}
}
@PreAuthorize
(
value
=
"@permissionValidator.isAppAdmin(#appId)"
)
@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
)
{
public
void
update
(
@PathVariable
String
appId
,
@RequestBody
AppModel
appModel
)
{
if
(!
Objects
.
equals
(
appId
,
appModel
.
getAppId
()))
{
if
(!
Objects
.
equals
(
appId
,
appModel
.
getAppId
()))
{
throw
new
BadRequestException
(
"The App Id of path variable and request body is different"
);
throw
new
BadRequestException
(
"The App Id of path variable and request body is different"
);
...
@@ -136,7 +136,7 @@ public class AppController {
...
@@ -136,7 +136,7 @@ public class AppController {
return
ResponseEntity
.
ok
().
build
();
return
ResponseEntity
.
ok
().
build
();
}
}
@RequestMapping
(
value
=
"/{appId}"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/{appId
:.+
}"
,
method
=
RequestMethod
.
GET
)
public
App
load
(
@PathVariable
String
appId
)
{
public
App
load
(
@PathVariable
String
appId
)
{
return
appService
.
load
(
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