Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
superrain51
apollo
提交
7b41718c
apollo
项目概览
superrain51
/
apollo
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
apollo
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7b41718c
编写于
7月 24, 2017
作者:
张
张乐
提交者:
GitHub
7月 24, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #669 from nobodyiam/appid-with-dot
support appid with dot
上级
5f7f1d3b
43d037b5
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
5 addition
and
10 deletion
+5
-10
apollo-adminservice/src/main/java/com/ctrip/framework/apollo/adminservice/controller/AppController.java
...amework/apollo/adminservice/controller/AppController.java
+3
-3
apollo-assembly/src/main/resources/application.yml
apollo-assembly/src/main/resources/application.yml
+0
-5
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/AppController.java
...rip/framework/apollo/portal/controller/AppController.java
+2
-2
未找到文件。
apollo-adminservice/src/main/java/com/ctrip/framework/apollo/adminservice/controller/AppController.java
浏览文件 @
7b41718c
...
@@ -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
浏览文件 @
7b41718c
...
@@ -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
浏览文件 @
7b41718c
...
@@ -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
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录