Commit graph

167 commits

Author SHA1 Message Date
Patrick Baumgartner
a0ba075bd8 Futher updates for Spring Boot 3.4 2024-11-27 11:24:18 +00:00
Dave Syer
91f55a4f71 Versionless webjars (again)
Spring Boot 3.4 supports the webjars-locator-lite which in turn
supports native images, so we are back to versionless URLs for
webjars assets in templates.
2024-11-27 08:32:35 +00:00
YiXuan Ding
1cad4124b7 Refactor code logic
<refactor>: remove useless logic cod.
<refactor>: detele useless annotation which is provided by Jpa.
<refactor>: refactor implement of `findByLastName`, use Jpa to simplify query.
2024-11-11 17:55:34 +00:00
YiXuan Ding
668629d5bd refactor OwnerRepository:
-<replace>: use `JpaRepository` to replace `Repository` in `OwnerRepository` class.
-<remove1>: remove `save()` method. JpaRepository provides it by default.
-<remove2>: remove `@Query` because in `Owner` class, the `@OneToMany` annotiation achieved `fetch` in query.
-<refactor1>: use `Optional<Owner>` to recieve the result from `findById()`, and if is null, throw `IllegalArugmentExpection`.
-<refactor2>: achieve the assert to judge return value in tests.
-<add>: add name to `@author` tag.
2024-11-10 09:14:42 +00:00
YiXuan Ding
50866def72 Refactor the logic and add unit test
-<add>: add `@NotBlank` validation to pet's name.
-<refactor>: delete useless code and add unit test to check duplicate Pet name validation logic.
-<modify>: add `Id` to pet in unit test.
-<refactor>: classify unit test.

<modify>: adjust code format.
2024-11-07 22:34:46 +08:00
YiXuan Ding
14af47d4e5 Refactor:
- <optimize>: delete logic `add owner to model` because of the comment `@ModelAttribute("owner")`.
- <fix>: add logical judgment in ordet to avoid `owner` from `form` and `ownerId` from `url` mismatch.
2024-11-06 18:46:58 +00:00
Patrick Baumgartner
a50bfb65bb Update Spring Boot release, adding Gradle build and cleanup
- Update Spring Boot release, Checkstyle, Mysql.
- Formatting pom.xml with sortpom-maven-plugin.
- Rename README to standard file name.
- Adding GitHub Action for Gradle.
2024-11-05 12:56:29 +00:00
Antoine Rey
62dbfa8e9a Remove the unnecessary includeFilters 2024-10-10 07:53:08 +01:00
Mousa Al Bateh
ae1bb8228c Minor code changes are the following:
-Removed unused variables from few files.
-Added null assertions in some tests.
-Removed unnecessary throw exceptions.
2024-10-10 07:50:06 +01:00
Guilherme Soares
fc442120ce fix(jmx): strip spaces before path 2024-09-30 21:42:09 +01:00
Patrick Baumgartner
f8001e0add Change chmod like other files 2024-09-30 21:41:01 +01:00
Patrick Baumgartner
6fffe61b93 Updated db containers, and dependencies 2024-09-30 21:41:01 +01:00
Patrick Baumgartner
39cc7e160e Upgrade Dependencies 2024-05-25 17:00:35 +01:00
Pedro Chevallier
405cdc635b Add user friendly error message 2024-05-16 17:59:59 +01:00
Dave Syer
c0bc917426 Formatting 2024-05-16 15:23:56 +01:00
Alex
395356afc6 remove leading spaces in /owners//pets//visits/new, /owners//pets//visits/new and /webjars/bootstrap/5.3.2/dist/js/bootstrap.bundle.min.js resulting in 404s 2024-05-16 13:35:22 +01:00
Anyul Rivas
8f799263e0 test: remove duplicate assertion 2024-05-16 13:30:35 +01:00
Anyul Rivas
19f5268ac1 test: improve test readability 2024-05-16 13:30:35 +01:00
Anyul Rivas
f3a67551c2 chore: optimize imports 2024-05-16 13:30:35 +01:00
Anyul Rivas
7055f0c6a6 test: refactor using AssertJ assertions 2024-05-16 13:30:35 +01:00
Anyul Rivas
c5b3b3597e test: modify assertion for increasing readability. 2024-05-16 13:30:35 +01:00
Anyul Rivas
ca5785465f Update src/test/java/org/springframework/samples/petclinic/service/ClinicServiceTests.java
Co-authored-by: zral <73640367+zyberzebra@users.noreply.github.com>
2024-05-16 13:30:35 +01:00
Anyul Rivas
d604a01984 Update src/test/java/org/springframework/samples/petclinic/model/ValidatorTests.java
Co-authored-by: zral <73640367+zyberzebra@users.noreply.github.com>
2024-05-16 13:30:35 +01:00
Anyul Rivas
57eb7443a6 test: modify assertion for increasing readability. 2024-05-16 13:30:35 +01:00
Anyul Rivas
dea3432a6d test: simplify code 2024-05-16 13:30:35 +01:00
Anyul Rivas
9ed20bf999 test: rewrite assertions using AssertJ better readability 2024-05-16 13:30:35 +01:00
Anyul Rivas
4f78b07490 test: rewrite assertion using AssertJ for consistency 2024-05-16 13:30:35 +01:00
Anyul Rivas
5941227ab3 test: complete assertions 2024-05-16 13:30:35 +01:00
Rob Oxspring
d69204f2c1 Running ./gradlew test should not require Docker 2023-12-08 10:02:50 +00:00
Patrick Baumgartner
de0e3663c0 Update dependency 2023-11-26 09:08:45 +00:00
Sébastien Deleuze
5a9d1fc40f Upgrade to Spring Boot 3.2.0 2023-11-23 18:51:25 +00:00
Dave Syer
5accc40c77 Suppress warning 2023-09-12 13:15:59 +01:00
evga7
4926e29270 Change validation annotations and whitespace handling 2023-08-24 14:38:46 -07:00
Dave Syer
b4efc934b2 Docker-based integration tests don't work in native for now 2023-07-07 10:42:01 +01:00
Dave Syer
c231682c2d Tidy up native tests 2023-07-07 10:25:30 +01:00
Dave Syer
029de905b3 Skip integration tests if docker unavailable 2023-07-05 13:53:07 +01:00
Dave Syer
3c1ef72e6d Test with test containers and docker compose 2023-06-12 14:02:33 +01:00
xerx593
2249cbcb6f Update CrashControllerTests.java 2023-05-09 10:57:40 +01:00
xerx593
0787ad6a22 improve jmeter test
---------------------
- jmeter update
- reduced owner + pet count (99% fixes "(Post) New Visit" issues)
- fixed JSS: jquery->bootstrap ;)
- changed post params from "body" to "form value" (better!)
- added "test" for GET and POST new pet
--------------------------------2023-04-25 22:47:37,313 INFO o.a.j.r.Summariser: summary =  65000 in 00:08:42 =  124.4/s Avg:  3526 Min:     4 Max: 20838 Err:     4 (0.01%)
2023-05-09 10:45:07 +01:00
Patrick Baumgartner
0962ed7e8f Updating dependencies and docker containers to current versions
See #1157
2023-03-10 14:00:30 +00:00
Dave Syer
1315cf6e1f Migrate to Spring Boot 3 2022-10-25 21:34:03 +02:00
Shweta Tyagi
c5763046dd Removed unnecessary semicolons (#998) 2022-08-22 10:59:52 +00:00
Julien Dubois
cbf80df5cc remove unused import 2022-06-16 12:02:02 +01:00
Dave Syer
dbcd37fe5d Relocate deprecated annotation 2022-06-09 10:26:03 +00:00
Dave Syer
5ecaccffe9 Make postgres data.sql properly idempotent
Fixes #936
2022-04-19 08:43:51 +00:00
Dave Syer
d381fb658c Use open session in view and populate model attrs
Open session in view was switched off accidentally a while ago. Also
the mapping changes recently meant that the changes to @Valid model
attributes were not being propagated correctly.

Fixes #946 and #947
2022-04-11 13:24:49 +00:00
Nouman Rahman
60ddc68387 Fixed Typo In PetClinicIntegrationTests 2022-03-22 12:56:35 +00:00
Dave Syer
e765e3ffe1 Fix lazy loading issue in owner details 2022-01-10 08:08:43 +00:00
Oliver Drotbohm
472575378c Additional tweaks in aggregate model.
Introduced Owner.addVisit(…) to avoid that state transition to live in controller code.

Slightly polished some assertions in ClinicServiceTests.
2022-01-07 09:18:19 +00:00
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