mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-15 20:35:49 +00:00
Fix date formatting
This commit is contained in:
parent
5b0f037d06
commit
45da5a4d3b
2 changed files with 2 additions and 2 deletions
2
src/main/java/org/springframework/samples/petclinic/owner/Pet.java
Normal file → Executable file
2
src/main/java/org/springframework/samples/petclinic/owner/Pet.java
Normal file → Executable file
|
@ -53,7 +53,7 @@ public class Pet extends NamedEntity {
|
||||||
|
|
||||||
@Column(name = "birth_date")
|
@Column(name = "birth_date")
|
||||||
@Temporal(TemporalType.DATE)
|
@Temporal(TemporalType.DATE)
|
||||||
@DateTimeFormat(pattern = "yyyy/MM/dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
private Date birthDate;
|
private Date birthDate;
|
||||||
|
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class Visit extends BaseEntity {
|
||||||
|
|
||||||
@Column(name = "visit_date")
|
@Column(name = "visit_date")
|
||||||
@Temporal(TemporalType.TIMESTAMP)
|
@Temporal(TemporalType.TIMESTAMP)
|
||||||
@DateTimeFormat(pattern = "yyyy/MM/dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
private Date date;
|
private Date date;
|
||||||
|
|
||||||
@NotEmpty
|
@NotEmpty
|
||||||
|
|
Loading…
Reference in a new issue