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
83be03ea
Commit
83be03ea
authored
Oct 09, 2016
by
Jason Song
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adjustment for local one-click start
parent
86371916
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
5 deletions
+39
-5
pom.xml
apollo-assembly/pom.xml
+11
-0
ApolloApplication.java
...om/ctrip/framework/apollo/assembly/ApolloApplication.java
+11
-0
LocalApolloApplication.java
...rip/framework/apollo/assembly/LocalApolloApplication.java
+1
-1
PortalOpenApiConfig.java
...m/ctrip/framework/apollo/openapi/PortalOpenApiConfig.java
+12
-0
PortalApplication.java
.../com/ctrip/framework/apollo/portal/PortalApplication.java
+4
-2
AbstractIntegrationTest.java
...trip/framework/apollo/portal/AbstractIntegrationTest.java
+0
-2
No files found.
apollo-assembly/pom.xml
View file @
83be03ea
...
...
@@ -33,4 +33,15 @@
<scope>
test
</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<configuration>
<executable>
true
</executable>
</configuration>
</plugin>
</plugins>
</build>
</project>
apollo-assembly/src/main/java/com/ctrip/framework/apollo/assembly/ApolloApplication.java
View file @
83be03ea
...
...
@@ -10,6 +10,7 @@ import org.springframework.boot.builder.SpringApplicationBuilder;
import
org.springframework.cloud.context.scope.refresh.RefreshScope
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
com.ctrip.framework.apollo.portal.PortalApplication
;
import
com.ctrip.framework.apollo.adminservice.AdminServiceApplication
;
import
com.ctrip.framework.apollo.configservice.ConfigServiceApplication
;
...
...
@@ -47,6 +48,16 @@ public class ApolloApplication {
.
sources
(
RefreshScope
.
class
).
run
(
args
);
logger
.
info
(
adminContext
.
getId
()
+
" isActive: "
+
adminContext
.
isActive
());
}
/**
* Portal
*/
if
(
commonContext
.
getEnvironment
().
containsProperty
(
"portal"
))
{
ConfigurableApplicationContext
portalContext
=
new
SpringApplicationBuilder
(
PortalApplication
.
class
).
parent
(
commonContext
)
.
sources
(
RefreshScope
.
class
).
run
(
args
);
logger
.
info
(
portalContext
.
getId
()
+
" isActive: "
+
portalContext
.
isActive
());
}
}
}
apollo-assembly/src/test/java/com/ctrip/framework/apollo/assembly/LocalApolloApplication.java
View file @
83be03ea
...
...
@@ -12,7 +12,7 @@ import org.springframework.context.ConfigurableApplicationContext;
import
com.ctrip.framework.apollo.adminservice.AdminServiceApplication
;
import
com.ctrip.framework.apollo.configservice.ConfigServiceApplication
;
import
com.ctrip.framework.apollo.PortalApplication
;
import
com.ctrip.framework.apollo.
portal.
PortalApplication
;
@SpringBootApplication
(
exclude
=
{
DataSourceAutoConfiguration
.
class
,
HibernateJpaAutoConfiguration
.
class
})
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/openapi/PortalOpenApiConfig.java
0 → 100644
View file @
83be03ea
package
com
.
ctrip
.
framework
.
apollo
.
openapi
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.Configuration
;
@EnableAutoConfiguration
@Configuration
@ComponentScan
(
basePackageClasses
=
PortalOpenApiConfig
.
class
)
public
class
PortalOpenApiConfig
{
}
apollo-portal/src/main/java/com/ctrip/framework/apollo/PortalApplication.java
→
apollo-portal/src/main/java/com/ctrip/framework/apollo/
portal/
PortalApplication.java
View file @
83be03ea
package
com
.
ctrip
.
framework
.
apollo
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
;
import
com.ctrip.framework.apollo.common.ApolloCommonConfig
;
import
com.ctrip.framework.apollo.openapi.PortalOpenApiConfig
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.actuate.system.ApplicationPidFileWriter
;
...
...
@@ -16,7 +17,8 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
@Configuration
@EnableAutoConfiguration
@EnableTransactionManagement
@ComponentScan
(
basePackageClasses
=
{
ApolloCommonConfig
.
class
,
PortalApplication
.
class
})
@ComponentScan
(
basePackageClasses
=
{
ApolloCommonConfig
.
class
,
PortalApplication
.
class
,
PortalOpenApiConfig
.
class
})
public
class
PortalApplication
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
...
...
apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/AbstractIntegrationTest.java
View file @
83be03ea
package
com
.
ctrip
.
framework
.
apollo
.
portal
;
import
com.ctrip.framework.apollo.PortalApplication
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.boot.test.SpringApplicationConfiguration
;
...
...
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