Skip to content

Commit

Permalink
Merge pull request #2 from yiming187/master
Browse files Browse the repository at this point in the history
Add sample apollo server and code style
  • Loading branch information
yiming187 committed Mar 10, 2016
2 parents cf5d2f9 + 6ad48ac commit df65c5a
Show file tree
Hide file tree
Showing 7 changed files with 827 additions and 10 deletions.
291 changes: 291 additions & 0 deletions apollo-dev/style/eclipse-java-google-style.xml

Large diffs are not rendered by default.

475 changes: 475 additions & 0 deletions apollo-dev/style/intellij-java-google-style.xml

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions apollo-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,22 @@
<groupId>com.ctrip.apollo</groupId>
<artifactId>apollo-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.ctrip.apollo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.config.server.EnableConfigServer;

@SpringBootApplication
@EnableConfigServer
public class ConfigServerApplication {

public static void main(String[] args) {
SpringApplication.run(ConfigServerApplication.class, args);
}

}
10 changes: 10 additions & 0 deletions apollo-server/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
server:
port: 8888

logging:
level:
org.springframework.cloud: 'DEBUG'

spring:
profiles:
active: native
3 changes: 3 additions & 0 deletions apollo-server/src/main/resources/bootstrap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
spring:
application:
name: apollo-server
26 changes: 16 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<version>0.0.1</version>
<name>Apollo</name>
<packaging>pom</packaging>

<modules>
<module>apollo-core</module>
<module>apollo-metaserver</module>
Expand Down Expand Up @@ -55,22 +54,18 @@
</dependency>
<!--third party -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<version>1.3.3.RELEASE</version>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-parent</artifactId>
<version>Angel.SR6</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.38</version>
</dependency>
<!--for test -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>1.3.3.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
Expand All @@ -89,8 +84,19 @@
<url>http://maven.dev.sh.ctripcorp.com:8081/nexus/content/repositories/fxsnapshot</url>
</snapshotRepository>
</distributionManagement>
<repositories>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/libs-milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<properties>
<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
</properties>
</project>

0 comments on commit df65c5a

Please sign in to comment.