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
69380224
Commit
69380224
authored
Mar 12, 2016
by
Yiming Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove lombok
parent
d1771497
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
18 deletions
+64
-18
AppController.java
...ava/com/ctrip/apollo/portal/controller/AppController.java
+8
-3
App.java
...l/src/main/java/com/ctrip/apollo/portal/entities/App.java
+56
-3
pom.xml
pom.xml
+0
-12
No files found.
apollo-portal/src/main/java/com/ctrip/apollo/portal/controller/AppController.java
View file @
69380224
package
com
.
ctrip
.
apollo
.
portal
.
controller
;
package
com
.
ctrip
.
apollo
.
portal
.
controller
;
import
java.util.Date
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.web.PageableDefault
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
...
@@ -19,14 +21,17 @@ public class AppController {
...
@@ -19,14 +21,17 @@ public class AppController {
private
AppRepository
appRepository
;
private
AppRepository
appRepository
;
@RequestMapping
(
""
)
@RequestMapping
(
""
)
public
Page
<
App
>
list
()
{
public
Page
<
App
>
list
(
@PageableDefault
(
size
=
50
)
Pageable
pageable
)
{
Pageable
pageable
=
new
PageRequest
(
0
,
10
);
return
appRepository
.
findAll
(
pageable
);
return
appRepository
.
findAll
(
pageable
);
}
}
@RequestMapping
(
value
=
""
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
""
,
method
=
RequestMethod
.
POST
)
public
App
create
()
{
public
App
create
()
{
App
ramdomApp
=
new
App
();
App
ramdomApp
=
new
App
();
ramdomApp
.
setId
(
String
.
valueOf
(
System
.
currentTimeMillis
()));
ramdomApp
.
setName
(
"new app "
+
System
.
currentTimeMillis
());
ramdomApp
.
setOwner
(
"owner "
+
System
.
currentTimeMillis
());
ramdomApp
.
setCreateTimestamp
(
new
Date
());
return
appRepository
.
save
(
ramdomApp
);
return
appRepository
.
save
(
ramdomApp
);
}
}
}
}
apollo-portal/src/main/java/com/ctrip/apollo/portal/entities/App.java
View file @
69380224
...
@@ -7,10 +7,7 @@ import javax.persistence.Column;
...
@@ -7,10 +7,7 @@ import javax.persistence.Column;
import
javax.persistence.Entity
;
import
javax.persistence.Entity
;
import
javax.persistence.Id
;
import
javax.persistence.Id
;
import
lombok.Data
;
@Entity
@Entity
@Data
public
class
App
implements
Serializable
{
public
class
App
implements
Serializable
{
/**
/**
...
@@ -38,4 +35,60 @@ public class App implements Serializable {
...
@@ -38,4 +35,60 @@ public class App implements Serializable {
@Column
@Column
private
Date
lastUpdatedTimestamp
;
private
Date
lastUpdatedTimestamp
;
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getOwner
()
{
return
owner
;
}
public
void
setOwner
(
String
owner
)
{
this
.
owner
=
owner
;
}
public
String
getOwnerPhone
()
{
return
ownerPhone
;
}
public
void
setOwnerPhone
(
String
ownerPhone
)
{
this
.
ownerPhone
=
ownerPhone
;
}
public
String
getOwnerMail
()
{
return
ownerMail
;
}
public
void
setOwnerMail
(
String
ownerMail
)
{
this
.
ownerMail
=
ownerMail
;
}
public
Date
getCreateTimestamp
()
{
return
createTimestamp
;
}
public
void
setCreateTimestamp
(
Date
createTimestamp
)
{
this
.
createTimestamp
=
createTimestamp
;
}
public
Date
getLastUpdatedTimestamp
()
{
return
lastUpdatedTimestamp
;
}
public
void
setLastUpdatedTimestamp
(
Date
lastUpdatedTimestamp
)
{
this
.
lastUpdatedTimestamp
=
lastUpdatedTimestamp
;
}
}
}
pom.xml
View file @
69380224
...
@@ -15,13 +15,6 @@
...
@@ -15,13 +15,6 @@
<module>
apollo-portal
</module>
<module>
apollo-portal
</module>
<module>
apollo-assembly
</module>
<module>
apollo-assembly
</module>
</modules>
</modules>
<dependencies>
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<optional>
true
</optional>
</dependency>
</dependencies>
<dependencyManagement>
<dependencyManagement>
<dependencies>
<dependencies>
<dependency>
<dependency>
...
@@ -47,11 +40,6 @@
...
@@ -47,11 +40,6 @@
<artifactId>
mysql-connector-java
</artifactId>
<artifactId>
mysql-connector-java
</artifactId>
<version>
5.1.38
</version>
<version>
5.1.38
</version>
</dependency>
</dependency>
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<version>
1.16.8
</version>
</dependency>
<!--for test -->
<!--for test -->
<dependency>
<dependency>
<groupId>
com.h2database
</groupId>
<groupId>
com.h2database
</groupId>
...
...
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