Dave Syer
b559077f14
Remove manual id management in child entities
...
This is reverting a workaround for a Hibernate "feature". There's
no need for the child entities (Pet and Visit) to know about their
parent (foreign key). Hibernate can manage that just fine with a
@JoinColumn. But it needs a nullable foreign key column in the
DB schema. That's the downside. The upside is much less code in
Java.
2022-01-06 11:23:02 +00:00
Dave Syer
423a337543
Move Visit to owner package (it's aggregate root)
2022-01-05 09:39:26 +00:00
Dave Syer
58fe6298f8
Also remove VisitRepository
...
Rely on Hibernate to do lazy loading on visits.
2022-01-05 09:30:23 +00:00
Dave Syer
c9534421c8
Remove PetRepository and use Owner as aggregate
...
Owner is really the aggregate root in DDD terms and there is no
need to directly access the Pet entity.
2022-01-05 08:24:58 +00:00
Dave Syer
e57ef71e54
Ensure real database is used if mysql profile active
2021-10-05 13:36:50 +01:00
Dave Syer
e11a594ec2
Tidy up test
2021-10-01 15:09:25 +01:00
simrin051
8ad9c05f74
Add pagination for owners and vets lists in HTML
...
Fixes #91
2021-10-01 08:31:38 +01:00
Dave Syer
4e1f87407d
Apply spring-format plugin
2020-01-03 11:22:05 +00:00
Stephane Nicoll
253e6fde5f
Polish "Migrate tests to JUnit 5"
...
See gh-360
2019-10-20 16:49:17 +02:00
Antoine Rey
ac69dbba23
Migrate tests to JUnit 5
...
See gh-360
2019-10-20 16:43:25 +02:00
Stephane Nicoll
ce7c3f93de
Upgrade to Spring Boot 2.2.0.RELEASE
2019-10-20 16:40:04 +02:00
Dave Syer
7ef045dac8
Make Pet.visits @Transient
...
In that way the Pet and Visit entities are more modular, and we
don't have to rely on a bit of a hack which is that Hibernate
happily maps Pet to its ID in the entity generation (but fails
if you do it at compile time).
2019-09-06 09:14:44 +01:00
Stephane Nicoll
8919c7317b
Polish "Cleanup tests by using more idiomatic assertj assertions"
...
See gh-418
2019-06-01 18:09:33 +02:00
Johannes Wengert
3f838c2df2
Cleanup tests by using more idiomatic assertj assertions
...
See gh-418
2019-06-01 18:03:52 +02:00
Stephane Nicoll
be24e0c15e
Fix Apache license headers
2019-03-21 11:08:00 +01:00
Dave Syer
827dc12325
Revert "Remove redundant component scan filter"
...
This reverts commit ab56724285 .
2019-02-11 08:08:57 +00:00
Dave Syer
ab56724285
Remove redundant component scan filter
...
The @DataJpaTests creates all the repositories. There's no need
for a filter (and there aren't any matching @Service beans anyway).
2018-12-17 16:41:44 +00:00
Stephane Nicoll
895730caf9
Simplify build definition
2018-10-07 13:40:45 +02:00
Stephane Nicoll
5ff057d90b
Remove misleading production profile
...
Closes gh-333
2018-07-10 08:50:58 +02:00
Stephane Nicoll
4c22d010ea
Polish "Use Java 8 LocalDate instead of java.util.Date"
...
Closes gh-328
2018-07-09 16:47:34 +02:00
Antoine Rey
c0748e3e82
Use Java 8 LocalDate instead of java.util.Date
...
See gh-328
2018-07-09 16:47:16 +02:00
Stephane Nicoll
eebca43df8
Polish "Fix content negotiation for /vets"
...
Closes gh-326
2018-06-04 10:48:39 +02:00
Aiden-at-508687582768
8eb5074770
Fix content negotiation for /vets
...
See gh-326
2018-06-04 10:39:21 +02:00
Dave Syer
cf35266336
Tidy up compiler warnings
2018-01-11 09:15:18 +00:00
sunflower2014
e20b43b009
Update PetControllerTests.java
...
correct testProcessCreationFormHasErrors method's post url
2017-11-03 11:38:44 +00:00
Oscar Utbult
23f65ba7d0
Fix broken tests
2017-11-03 11:33:06 +00:00
Dave Syer
0a51540ad0
Fix serializability of Vet
2017-02-03 10:03:11 +00:00
Dave Syer
80269539e2
Configure caching properly to avoid error in vets
2017-01-08 15:45:30 +00:00
Dave Syer
83ff9a50e3
Modularize and migrate to aggregate-oriented domain
...
Vet, Owner, Visit. The Visit "aggregate" is a little artificial
but it demonstrates a useful point about not holding on to
references of "parent" (reference data) objects, i.e. the Visit has
an Integer petId, instead of a Pet field. In principle this app is
now almost ready to migrate to multiple services if anyone wanted
to do that.
2016-11-14 15:36:21 +00:00
Dave Syer
095b1a35d9
Move util class to test code
2016-11-10 17:45:54 +00:00
Dave Syer
e38a9feebe
Convert to jar with thymeleaf
2016-11-10 17:22:02 +00:00
Antoine Rey
b889abbe7f
Replace SpringJUnit4ClassRunner by SpringRunner
2016-10-01 13:00:25 +02:00
Dapeng
a9b6565fcf
Remove dependency with joda time to simplify the project dependencies
2016-09-25 18:25:33 +02:00
Antoine Rey
864580702f
Remove unused properties
2016-08-23 19:45:00 +02:00
Antoine Rey
620141da5d
Convert Controler's integration test to unit test
2016-08-19 18:29:53 +02:00
Antoine Rey
1080006218
Merging AbstractClinicServiceTests and ClinicServiceSpringDataJpaTests then using the Spring Boot @DataJpaTest annotation
2016-08-19 18:29:17 +02:00
Antoine Rey
2637f65b90
Upgrade to Spring Boot 1.4.0
2016-08-17 18:31:38 +02:00
Dapeng
077f4eb105
simplify content negotiation setup
...
- remove custom xml view, use springboot builtin xml view
- remove oxm maven dependency
- remove json-simple maven dependency (seems not relevant anymore)
- update vetsXml test using xpath
2016-06-28 11:05:42 +08:00
Antoine Rey
4da41dbbda
#164 Disable cache configuration for unit tests
2016-06-24 21:18:38 +02:00
Antoine Rey
a6e81a51a0
#164 Spring Boot version of Petclinic ready to deploy to an external web container (ie Tomcat)
2016-06-23 19:42:02 +02:00
Attilio
ca755be44a
Improvements in VisitRepository.findByPetId implementation.
...
- In the Jdbc implementation: pets belonging to a visit were not added.
- In the Jpa implementation: query variable was wrong.
- Test case: AbstractClinicServiceTests.shouldFindVisitsByPetId()
2016-06-15 22:46:47 +02:00
Faisal Hameed
ad3d322fc6
Fising squid:S2970, squid:S1192, squid:S1488, squid:UselessParenthesesCheck
2016-05-13 14:59:46 +05:00
Colin But
845d31e8ed
Added test class for Controllers plus a test for PetTypeFormatter
2015-11-20 13:56:44 +00:00
Antoine Rey
92de6557e1
Fix #111 For pet's birthday we are now using jodatime LocalDate instead of DateTime
2015-10-28 08:57:42 +01:00
Antoine Rey
09ed33a5fc
#96 Reformat code with EditorConfig
2015-10-16 09:33:28 +02:00
Antoine Rey
4bb829cbd1
Fix #101 display the pet type when using the JDBC profile
2015-10-13 18:41:18 +02:00
Antoine Rey
98d9bbb629
Removing reference to the unknown UserResource class
2015-06-24 18:43:45 +02:00
Antoine Rey
ca3bb07fa4
Remove unused WebApplicationContext property
2015-06-18 18:29:49 +02:00
Antoine Rey
1b4d4256c4
Fix typo into javadoc
2015-06-18 18:28:31 +02:00
michaelisvy
c553d39f8d
Merge pull request #67 from mklose/patch-1
...
fix typo
2015-05-20 23:13:04 +08:00