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
f6989346
Commit
f6989346
authored
Mar 13, 2016
by
Yiming Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Spring pom.xml
parent
b3309f1a
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
197 additions
and
81 deletions
+197
-81
.gitattributes
.gitattributes
+2
-0
pom.xml
apollo-configserver/pom.xml
+15
-5
pom.xml
apollo-metaserver/pom.xml
+8
-0
pom.xml
apollo-portal/pom.xml
+10
-2
PortalApplication.java
.../main/java/com/ctrip/apollo/portal/PortalApplication.java
+1
-0
SampleController.java
.../com/ctrip/apollo/portal/controller/SampleController.java
+0
-14
App.java
...tal/src/main/java/com/ctrip/apollo/portal/domain/App.java
+1
-1
AppRepository.java
...in/java/com/ctrip/apollo/portal/domain/AppRepository.java
+1
-3
AppService.java
...main/java/com/ctrip/apollo/portal/service/AppService.java
+31
-0
AppController.java
.../main/java/com/ctrip/apollo/portal/web/AppController.java
+16
-13
application.properties
apollo-portal/src/main/resources/application.properties
+1
-2
AppRepositoryTest.java
...com/ctrip/apollo/portal/repository/AppRepositoryTest.java
+2
-1
application.properties
apollo-portal/src/test/resources/application.properties
+0
-2
pom.xml
pom.xml
+109
-38
No files found.
.gitattributes
0 → 100644
View file @
f6989346
text=auto
\ No newline at end of file
apollo-configserver/pom.xml
View file @
f6989346
...
...
@@ -21,17 +21,19 @@
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
<artifactId>
spring-boot-starter-data-jpa
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-data-jpa
</artifactId>
<groupId>
org.springframework.data
</groupId>
<artifactId>
spring-data-redis
</artifactId>
</dependency>
<dependency>
<groupId>
redis.clients
</groupId>
<artifactId>
jedis
</artifactId>
</dependency>
<dependency>
<groupId>
com.h2database
</groupId>
<artifactId>
h2
</artifactId>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
mysql
</groupId>
...
...
@@ -39,4 +41,12 @@
<scope>
runtime
</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
</plugins>
</build>
</project>
apollo-metaserver/pom.xml
View file @
f6989346
...
...
@@ -25,4 +25,12 @@
<scope>
test
</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
</plugins>
</build>
</project>
apollo-portal/pom.xml
View file @
f6989346
...
...
@@ -21,8 +21,8 @@
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-
starter-test
</artifactId>
<
scope>
test
</scope
>
<artifactId>
spring-boot-
devtools
</artifactId>
<
optional>
true
</optional
>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
...
...
@@ -38,4 +38,12 @@
<scope>
runtime
</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
</plugins>
</build>
</project>
apollo-portal/src/main/java/com/ctrip/apollo/portal/PortalApplication.java
View file @
f6989346
...
...
@@ -5,6 +5,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public
class
PortalApplication
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
SpringApplication
.
run
(
PortalApplication
.
class
,
args
);
}
...
...
apollo-portal/src/main/java/com/ctrip/apollo/portal/controller/SampleController.java
deleted
100644 → 0
View file @
b3309f1a
package
com
.
ctrip
.
apollo
.
portal
.
controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
@RequestMapping
(
"/"
)
public
class
SampleController
{
@RequestMapping
(
""
)
public
String
home
()
{
return
"Hello World!"
;
}
}
apollo-portal/src/main/java/com/ctrip/apollo/portal/
entities
/App.java
→
apollo-portal/src/main/java/com/ctrip/apollo/portal/
domain
/App.java
View file @
f6989346
package
com
.
ctrip
.
apollo
.
portal
.
entities
;
package
com
.
ctrip
.
apollo
.
portal
.
domain
;
import
java.io.Serializable
;
import
java.util.Date
;
...
...
apollo-portal/src/main/java/com/ctrip/apollo/portal/
repository
/AppRepository.java
→
apollo-portal/src/main/java/com/ctrip/apollo/portal/
domain
/AppRepository.java
View file @
f6989346
package
com
.
ctrip
.
apollo
.
portal
.
repository
;
package
com
.
ctrip
.
apollo
.
portal
.
domain
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.repository.CrudRepository
;
import
com.ctrip.apollo.portal.entities.App
;
public
interface
AppRepository
extends
CrudRepository
<
App
,
String
>
{
Page
<
App
>
findAll
(
Pageable
pageable
);
...
...
apollo-portal/src/main/java/com/ctrip/apollo/portal/service/AppService.java
0 → 100644
View file @
f6989346
package
com
.
ctrip
.
apollo
.
portal
.
service
;
import
java.util.Date
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.stereotype.Service
;
import
com.ctrip.apollo.portal.domain.App
;
import
com.ctrip.apollo.portal.domain.AppRepository
;
@Service
public
class
AppService
{
@Autowired
private
AppRepository
appRepository
;
public
App
detail
(
String
appId
)
{
return
appRepository
.
findOne
(
appId
);
}
public
Page
<
App
>
list
(
Pageable
pageable
)
{
return
appRepository
.
findAll
(
pageable
);
}
public
App
save
(
App
app
)
{
app
.
setCreateTimestamp
(
new
Date
());
return
appRepository
.
save
(
app
);
}
}
apollo-portal/src/main/java/com/ctrip/apollo/portal/
controller
/AppController.java
→
apollo-portal/src/main/java/com/ctrip/apollo/portal/
web
/AppController.java
View file @
f6989346
package
com
.
ctrip
.
apollo
.
portal
.
controller
;
import
java.util.Date
;
package
com
.
ctrip
.
apollo
.
portal
.
web
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.web.PageableDefault
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.ctrip.apollo.portal.
entities
.App
;
import
com.ctrip.apollo.portal.
repository.AppRepository
;
import
com.ctrip.apollo.portal.
domain
.App
;
import
com.ctrip.apollo.portal.
service.AppService
;
@RestController
@RequestMapping
(
"/apps"
)
public
class
AppController
{
@Autowired
private
AppRepository
appRepository
;
@RequestMapping
(
""
)
public
Page
<
App
>
list
(
@PageableDefault
(
size
=
50
)
Pageable
pageable
)
{
return
appRepository
.
findAll
(
pageable
);
}
private
AppService
appService
;
@RequestMapping
(
value
=
""
,
method
=
RequestMethod
.
POST
)
public
App
create
(
App
app
)
{
app
.
setCreateTimestamp
(
new
Date
());
return
appRepository
.
save
(
app
);
return
appService
.
save
(
app
);
}
@RequestMapping
(
"/{appid}"
)
public
App
detail
(
@PathVariable
String
appId
)
{
return
appService
.
detail
(
appId
);
}
@RequestMapping
(
""
)
public
Page
<
App
>
list
(
@PageableDefault
(
size
=
50
)
Pageable
pageable
)
{
return
appService
.
list
(
pageable
);
}
}
apollo-portal/src/main/resources/application.properties
View file @
f6989346
spring.datasource.url
=
jdbc:h2:file:~/fxapolloportaldb
spring.datasource.url
=
jdbc:h2:file:~/fxapolloportaldb
;DB_CLOSE_ON_EXIT=FALSE
spring.datasource.username
=
sa
spring.datasource.password
=
sa
spring.datasource.driver-class-name
=
org.h2.Driver
apollo-portal/src/test/java/com/ctrip/apollo/portal/repository/AppRepositoryTest.java
View file @
f6989346
...
...
@@ -10,7 +10,8 @@ import org.springframework.boot.test.SpringApplicationConfiguration;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
com.ctrip.apollo.portal.PortalApplicationTestConfiguration
;
import
com.ctrip.apollo.portal.entities.App
;
import
com.ctrip.apollo.portal.domain.App
;
import
com.ctrip.apollo.portal.domain.AppRepository
;
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@SpringApplicationConfiguration
(
classes
=
PortalApplicationTestConfiguration
.
class
)
...
...
apollo-portal/src/test/resources/application.properties
View file @
f6989346
...
...
@@ -2,4 +2,3 @@ spring.datasource.url = jdbc:h2:file:~/fxapolloportaldb;DB_CLOSE_ON_EXIT=FALSE
spring.datasource.username
=
sa
spring.datasource.password
=
sa
spring.h2.console.enabled
=
true
\ No newline at end of file
pom.xml
View file @
f6989346
...
...
@@ -7,6 +7,57 @@
<version>
0.0.1
</version>
<name>
Apollo
</name>
<packaging>
pom
</packaging>
<description>
Ctrip Configuration Center
</description>
<url>
https://github.com/ctripcorp/apollo
</url>
<organization>
<name>
Ctrip, Inc.
</name>
<url>
http://www.ctrip.com
</url>
</organization>
<licenses>
<license>
<name>
Apache License, Version 2.0
</name>
<url>
http://www.apache.org/licenses/LICENSE-2.0
</url>
</license>
</licenses>
<scm>
<url>
https://github.com/ctripcorp/apollo
</url>
</scm>
<developers>
<developer>
<id>
yiming187
</id>
<name>
Billy(Yiming) Liu
</name>
<email>
liuyiming.vip at gmail.com
</email>
<organization>
Ctrip, Inc.
</organization>
<organizationUrl>
http://www.ctrip.com
</organizationUrl>
<roles>
<role>
Developer
</role>
</roles>
</developer>
<developer>
<id>
nobodyiam
</id>
<name>
Jason(Shun) Song
</name>
<email>
nobodyiam at gmail.com
</email>
<organization>
Ctrip, Inc.
</organization>
<organizationUrl>
http://www.ctrip.com
</organizationUrl>
<roles>
<role>
Developer
</role>
</roles>
</developer>
<developer>
<id>
lepdou
</id>
<name>
Le Zhang
</name>
<email>
lepdou at gmail.com
</email>
<organization>
Ctrip, Inc.
</organization>
<organizationUrl>
http://www.ctrip.com
</organizationUrl>
<roles>
<role>
Developer
</role>
</roles>
</developer>
</developers>
<properties>
<project.build.sourceEncoding>
utf-8
</project.build.sourceEncoding>
<java.version>
1.8
</java.version>
</properties>
<modules>
<module>
apollo-core
</module>
<module>
apollo-metaserver
</module>
...
...
@@ -29,13 +80,6 @@
</dependency>
<!--third party -->
<dependency>
<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>
...
...
@@ -46,36 +90,67 @@
<artifactId>
h2
</artifactId>
<version>
1.4.191
</version>
</dependency>
<!-- declare Spring BOMs in order -->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-parent
</artifactId>
<version>
1.3.3.RELEASE
</version>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-config
</artifactId>
<version>
1.1.0.M5
</version>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>
maven-compiler-plugin
</artifactId>
<version>
3.5.1
</version>
<configuration>
<source>
${java.source}
</source>
<target>
${java.target}
</target>
</configuration>
</plugin>
<plugin>
<artifactId>
maven-source-plugin
</artifactId>
<version>
3.0.0
</version>
<executions>
<execution>
<id>
attach-sources
</id>
<goals>
<goal>
jar
</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<version>
1.3.3.RELEASE
</version>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<artifactId>
maven-compiler-plugin
</artifactId>
<version>
3.5.1
</version>
<configuration>
<source>
${java.source}
</source>
<target>
${java.target}
</target>
</configuration>
</plugin>
<plugin>
<artifactId>
maven-source-plugin
</artifactId>
<version>
3.0.0
</version>
<executions>
<execution>
<id>
attach-sources
</id>
<goals>
<goal>
jar
</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<version>
1.3.3.RELEASE
</version>
<executions>
<execution>
<goals>
<goal>
repackage
</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
...
...
@@ -127,9 +202,5 @@
</snapshots>
</repository>
</repositories>
<properties>
<project.build.sourceEncoding>
utf-8
</project.build.sourceEncoding>
<java.version>
1.8
</java.version>
</properties>
</project>
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