Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
spring-petclinic-microservices
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sebastien Briot
spring-petclinic-microservices
Commits
c470c0c1
Commit
c470c0c1
authored
8 years ago
by
Antoine Rey
Browse files
Options
Downloads
Patches
Plain Diff
Remove Lombok (bad support in my IDE)
parent
4a7fa464
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pom.xml
+0
-7
0 additions, 7 deletions
pom.xml
src/main/java/org/springframework/samples/petclinic/web/PetResource.java
+52
-11
52 additions, 11 deletions
...rg/springframework/samples/petclinic/web/PetResource.java
with
52 additions
and
18 deletions
pom.xml
+
0
−
7
View file @
c470c0c1
...
...
@@ -51,13 +51,6 @@
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<version>
1.16.10
</version>
<scope>
provided
</scope>
</dependency>
<dependency>
<groupId>
org.webjars
</groupId>
<artifactId>
bootstrap
</artifactId>
...
...
This diff is collapsed.
Click to expand it.
src/main/java/org/springframework/samples/petclinic/web/PetResource.java
+
52
−
11
View file @
c470c0c1
...
...
@@ -16,8 +16,6 @@
package
org.springframework.samples.petclinic.web
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
lombok.Getter
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
org.springframework.http.HttpStatus
;
...
...
@@ -25,13 +23,7 @@ import org.springframework.samples.petclinic.model.Owner;
import
org.springframework.samples.petclinic.model.Pet
;
import
org.springframework.samples.petclinic.model.PetType
;
import
org.springframework.samples.petclinic.service.ClinicService
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.ResponseStatus
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.constraints.Size
;
import
java.util.Date
;
...
...
@@ -105,7 +97,6 @@ public class PetResource {
return
new
PetDetails
(
pet
);
}
@Data
static
class
PetRequest
{
int
id
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
...
...
@@ -113,9 +104,40 @@ public class PetResource {
@Size
(
min
=
1
)
String
name
;
int
typeId
;
public
int
getId
()
{
return
id
;
}
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
public
Date
getBirthDate
()
{
return
birthDate
;
}
public
void
setBirthDate
(
Date
birthDate
)
{
this
.
birthDate
=
birthDate
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
int
getTypeId
()
{
return
typeId
;
}
public
void
setTypeId
(
int
typeId
)
{
this
.
typeId
=
typeId
;
}
}
@Getter
static
class
PetDetails
{
long
id
;
...
...
@@ -133,6 +155,25 @@ public class PetResource {
this
.
type
=
pet
.
getType
();
}
public
long
getId
()
{
return
id
;
}
public
String
getName
()
{
return
name
;
}
public
String
getOwner
()
{
return
owner
;
}
public
Date
getBirthDate
()
{
return
birthDate
;
}
public
PetType
getType
()
{
return
type
;
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment