Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wrr-cat
apollo
提交
4054304f
apollo
项目概览
wrr-cat
/
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,体验更适合开发者的 AI 搜索 >>
提交
4054304f
编写于
4月 19, 2016
作者:
Y
Yiming Liu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Inject authed RestTemplate into Portal
上级
429792a4
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
23 addition
and
11 deletion
+23
-11
apollo-biz/pom.xml
apollo-biz/pom.xml
+0
-5
apollo-configservice/pom.xml
apollo-configservice/pom.xml
+5
-0
apollo-portal/src/main/java/com/ctrip/apollo/PortalApplication.java
...tal/src/main/java/com/ctrip/apollo/PortalApplication.java
+1
-1
apollo-portal/src/main/java/com/ctrip/apollo/portal/api/API.java
...portal/src/main/java/com/ctrip/apollo/portal/api/API.java
+14
-4
apollo-portal/src/main/resources/application.yml
apollo-portal/src/main/resources/application.yml
+1
-1
apollo-portal/src/test/java/com/ctrip/apollo/portal/AbstractPortalTest.java
...test/java/com/ctrip/apollo/portal/AbstractPortalTest.java
+2
-0
未找到文件。
apollo-biz/pom.xml
浏览文件 @
4054304f
...
...
@@ -26,10 +26,5 @@
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
</dependency>
<dependency>
<groupId>
com.h2database
</groupId>
<artifactId>
h2
</artifactId>
<scope>
test
</scope>
</dependency>
</dependencies>
</project>
apollo-configservice/pom.xml
浏览文件 @
4054304f
...
...
@@ -67,6 +67,11 @@
</exclusions>
</dependency>
<!-- end of eureka -->
<dependency>
<groupId>
com.h2database
</groupId>
<artifactId>
h2
</artifactId>
<scope>
test
</scope>
</dependency>
</dependencies>
<build>
<plugins>
...
...
apollo-portal/src/main/java/com/ctrip/apollo/
portal/
PortalApplication.java
→
apollo-portal/src/main/java/com/ctrip/apollo/PortalApplication.java
浏览文件 @
4054304f
package
com.ctrip.apollo
.portal
;
package
com.ctrip.apollo
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.actuate.system.ApplicationPidFileWriter
;
...
...
apollo-portal/src/main/java/com/ctrip/apollo/portal/api/API.java
浏览文件 @
4054304f
package
com.ctrip.apollo.portal.api
;
import
com.ctrip.apollo.core.enums.Env
;
import
com.ctrip.apollo.core.exception.ServiceException
;
import
com.ctrip.apollo.portal.service.ServiceLocator
;
import
javax.annotation.PostConstruct
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.client.RestTemplate
;
import
com.ctrip.apollo.common.auth.RestTemplateFactory
;
import
com.ctrip.apollo.core.enums.Env
;
import
com.ctrip.apollo.core.exception.ServiceException
;
import
com.ctrip.apollo.portal.service.ServiceLocator
;
public
class
API
{
@Autowired
protected
ServiceLocator
serviceLocator
;
@Autowired
private
RestTemplateFactory
restTemplateFactory
;
protected
RestTemplate
restTemplate
;
@PostConstruct
private
void
postConstruct
()
{
restTemplate
=
restTemplateFactory
.
getObject
();
}
public
String
getAdminServiceHost
(
Env
env
)
{
// 本地测试用
// return "http://localhost:8090";
...
...
@@ -25,5 +35,5 @@ public class API {
}
return
""
;
}
}
apollo-portal/src/main/resources/application.yml
浏览文件 @
4054304f
...
...
@@ -15,4 +15,4 @@ ctrip:
apollo
:
portal
:
env
:
dev
env
:
local
apollo-portal/src/test/java/com/ctrip/apollo/portal/AbstractPortalTest.java
浏览文件 @
4054304f
...
...
@@ -4,6 +4,8 @@ import org.junit.runner.RunWith;
import
org.springframework.boot.test.SpringApplicationConfiguration
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
com.ctrip.apollo.PortalApplication
;
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@SpringApplicationConfiguration
(
classes
=
PortalApplication
.
class
)
public
abstract
class
AbstractPortalTest
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录