to prevent runtime exception
Spring Framework 6+ requires parameter name reflection or explicitly
named annotations.
This commit adds missing `name = "..."` attributes to all @RequestParam
and @PathVariable
usages across controller classes.
Affected controllers:
- OwnerController
- PetController
- VisitController
- VetController
This change prevents the following runtime error:
IllegalArgumentException: Name for argument of type [int] not
specified...
The application now builds and runs cleanly with `./gradlew clean
build`.
Signed-off-by: nirsa <islandtim@naver.com>
- Fixed issue where editing a pet's type or name wasn't persisting
- Updated processUpdateForm to modify existing pet instead of
adding new one
- Added proper handling of existing pet update
Fixes#1752
-<modify>: remove `@Transactional`.
-<add>: create unit-test file related to `PetValidator`.
-<refactor>: move pet objects initialization to `@BeforeEach` setup.
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.
<refactor>: remove useless logic cod.
<refactor>: detele useless annotation which is provided by Jpa.
<refactor>: refactor implement of `findByLastName`, use Jpa to simplify query.
-<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.
-<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.
- <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.
- Update Spring Boot release, Checkstyle, Mysql.
- Formatting pom.xml with sortpom-maven-plugin.
- Rename README to standard file name.
- Adding GitHub Action for Gradle.