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
thomasperkins1123
a2f1ad5503
Make maven and gradle share checkstyle configuration
2024-02-14 14:06:03 +00:00
thomasperkins1123
da1c93d367
Make suppresions work on windows paths
2024-02-14 14:06:03 +00:00
thomasperkins1123
ee6573cee0
Add checkstyle for gradle
2024-02-14 14:06:03 +00:00
Dave Syer
836d111e99
Fix formatting
2024-01-31 21:54:55 +00:00
shadab-stack
2fe96130c0
Confirmation messages displayed for 'Add, edit, or update' actions
2024-01-31 21:54:55 +00:00
Dave Syer
cdd925d664
Small optimization for empty petId
2024-01-11 13:18:33 +00:00
Rob Oxspring
0aa3adb56f
Checkstyle NoHttp suppresses all log files
2023-12-13 10:39:00 +00: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
Dave Syer
d11d6e8e40
Remove unnecessary model change
2023-09-12 12:11:33 +01:00
anthony-park
18266fec8b
feat: Add a Korean message file to support at least one non-European language
...
This commit introduces a new Korean message file to the project. With this addition, the project now supports messages in languages other than European languages.
Resolves : #1299
2023-09-12 11:31:20 +01:00
evga7
4926e29270
Change validation annotations and whitespace handling
2023-08-24 14:38:46 -07:00
bijomutta
0a529015bc
handling Null pointer Exception on OwnerID
2023-07-14 10:27:01 +01:00
bijomutta
3a6127557d
Adding pet name validation on edit Pet
2023-07-13 13:05:34 +01:00
bijomutta
3be289517d
Add birthdate validation
2023-07-10 15:00:26 +01: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
Seunghyeon Ji
ca2d8dbc09
Update VetController.java
...
Erasing unnecessary 1 line
2023-07-05 11:34:44 +01:00
Dave Syer
3c1ef72e6d
Test with test containers and docker compose
2023-06-12 14:02:33 +01:00
Patrick Baumgartner
0d9e882e54
Upgrade for Spring Boot 3.1 ( #1253 )
...
* Upgrade for Spring Boot 3.1
* Remove 'encoding' because of Maven WARNING
* Extracting logo SVG into file
* Making logo src context-path aware
* Remove unused image
2023-05-26 18:56:00 +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
jcw1031
8a5a14e88a
Owner class addVisit() method return type void
2023-05-09 10:35:06 +01:00
Andrii Abramov
6e71aaa44c
Fix typo in OwnerRepository.java
2023-04-13 14:11:33 +01:00
ross
b94d30626f
Fix typo
...
fix typo of org.springframework.samples.petclinic.owner.Owner.getPet(java.lang.String) annotation.
2023-04-13 14:10:05 +01:00
Patrick Baumgartner
0962ed7e8f
Updating dependencies and docker containers to current versions
...
See #1157
2023-03-10 14:00:30 +00:00
Duncan Casteleyn
cc4667122d
Resource bundle not included in native image
2023-03-10 08:10:28 +00:00
Dave Syer
f2d9c9b63f
Remove unnecessary native hint
2023-02-24 09:23:35 +00:00
Dave Syer
b298af380d
Remove unnecessary model attribute
2023-02-21 11:46:22 +00:00
Sébastien Deleuze
f53e0d098e
Additional setup to support native image creation.
...
- Switch to Caffeine for caching since it is supported on native unlike Ehcache
- Use latest metadata repository 0.2.3 (will be the default with Native Build Tools 0.9.15)
- Registers resource hints for WebJars and db resource directory
2022-10-25 21:37:25 +02:00
Dave Syer
1315cf6e1f
Migrate to Spring Boot 3
2022-10-25 21:34:03 +02:00
Oliver Drotbohm
9ecdc1111e
Polish Thymeleaf templates.
...
Make sure we use the suggested fragment inclusion syntax. Use th:insert instead of th:include. Use simpler URI path segment templating to avoid duplication of expressions.
Avoid trailing slashes in URIs creates as upcoming Spring Boot versions will not map the trailing slash flavors of defined URI mappings.
2022-10-25 21:27:58 +02:00
Sébastien Deleuze
a5cbb8505a
Use WebJars versioned URLs ( #1099 )
...
In order to improve efficiency (see spring-projects/spring-framework#27619 )
and allow native image compatibility, this commit uses WebJars versioned URLs
which are supported out of the box on Spring Boot via /META-INF/resources
default resource location configuration, removing the need to use
webjars-locator-core dependency and WebJarsResourceResolver.
I have been able to measure a consistent 5% startup time improvement on
the JVM with that simple change on my local machine.
2022-10-16 16:12:23 +01:00
Kiyeon Cho
f48227aea0
Readability improvements & Use stream instread of forEach ( #1055 )
...
* Use stream instead of forEach on find PetType logic of parse()
* Improve controllers readability
* Rollback stream instead of for-each
2022-09-24 06:40:31 +01: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
kvaithin
80d03f3cef
985 remove lastName method param from OwnerController
2022-06-15 16:15:15 +00:00
Tagir Valeev
2a12048e78
Update javadoc: it incorrectly said to return 'true'
2022-06-15 17:12:59 +01:00
Dave Syer
dbcd37fe5d
Relocate deprecated annotation
2022-06-09 10:26:03 +00:00
Dave Syer
0c1fa8e8e2
Update name of deprecated config property
2022-05-19 14:08:07 +00:00
Dave Syer
1db99dbb58
Update to Spring Boot 2.7.0
2022-05-19 14:07:16 +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
bdcaa85460
Alternative approach with eager fetch
2022-01-10 08:21:14 +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
Shaan Sapra
43beff91a3
Avoid dropping Postgres schema
...
The postgres user needs to be an owner of the public schema or a
superuser in order to execute the schema.sql for database
initialization.
To avoid that, two changes are required:
- use `CREATE TABLE IF NOT EXISTS` in order to idempotently create the
necessary tables
- handle conflicts when inserting duplicate data
This follows the pattern in use by the
src/main/resources/db/mysql/{data,schema.sql} files.
Authored-by: Shaan Sapra <shsapra@vmware.com>
2022-01-06 07:22:50 +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
094d3021e9
Upgrade to Spring Boot 2.6.1 and fix Maven build
2021-12-16 11:39:30 +00:00
Fabian Muscariello
ce626da705
Add support for PostgreSQL
...
See #636
2021-12-07 16:55:01 +00:00
Dave Syer
eff7c9529f
Use "date" type for date inputs
...
In 2021 we really should be using the browser's own date picker.
2021-12-06 14:33:58 +00:00
Dave Syer
67c8bf6a1f
Fix ignores
2021-11-24 11:39:25 +00:00
Dave Syer
576c4eb58b
Remove unused css files
2021-11-24 09:27:15 +00:00
Dave Syer
4ecc4c34c4
Make buttons look normal again
2021-11-24 09:14:14 +00:00
Dave Syer
ff2febe09f
Put CSS generation in a Maven profile
2021-11-24 07:50:15 +00:00
Dave Syer
7ea283613d
Alternative approach with libsass-maven-plugin
2021-11-24 07:48:14 +00:00
Dave Syer
4d4727fce1
No need for jquery
2021-11-24 07:48:14 +00:00
Dave Syer
1095a15f0e
Convert to SCSS and Bootstrap 5
2021-11-24 07:48:14 +00:00
Dave Syer
4f2f8fab73
Remove redundant interface
2021-11-19 15:30:56 +00:00
Dave Syer
3eba970fff
Fix page links
2021-11-19 13:34:47 +00:00
Dave Syer
8bfe9e68bf
Tidy imports
2021-10-19 10:55:07 +01: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
25ba1621a9
Add delimiter to list of pets
2021-09-14 17:33:24 +01:00
lsap
e7c879ed3a
Update petclinic_db_setup_mysql.txt
...
Hey Team, thanks in advance!
2021-05-14 16:17:25 +01:00
Frank Migliorino
b91e21378c
Fix docs for setting profiles
...
Add using -Dspring-boot.run.jvmArguments to the notes for how to set up using MySQL.
2021-05-14 13:01:26 +01:00
Cesarion Pshebytski
8b1ac6736e
Updated user for mysql
...
Updated creation of user for mysql db. Previously lack of quotes resulted in creation of incorrect user (petclinic@% instead of just petclinic)
2020-11-06 11:13:25 +00:00
Rognetta
4953f87917
Update application-mysql.properties
...
Add some environment variables with defaults for the MySQL
credentials.
Closes #506
2020-06-25 17:12:30 +01:00
aleVeD
0390e85c25
adding new message in Spanish
2020-06-23 19:17:42 +01:00
Dave Syer
07b9d5aa45
Ensure fragment for menu items is not itself rendered
...
Formerly there was a "ghost" menu item with no text and no icon
because Thymeleaf had not been instructed to remove the fragment
definition. This change tidies that up and also removes the use of
the "path" variable, which Thymeleaf populates from the current
request context, and poses a potential security threat as a
result (if users type malicious characters in the URL).
2020-06-13 14:56:10 +01:00
Jay
410abc21f3
remove trailing slash
2020-06-13 14:06:34 +01:00
Stephane Nicoll
628862206b
Switch actuator to standard path
2020-05-02 08:02:49 +02:00
Stephane Nicoll
8805eaa721
Disable open-in-view explicitly to remove warning on startup
2020-03-20 18:27:18 +01:00
Stephane Nicoll
c0847b7571
Add support for H2
...
Closes gh-584
2020-03-20 18:27:18 +01:00
Dave Syer
5c35771a20
Wrong name for user.sql script
2020-03-10 08:29:36 +00:00
Stephane Nicoll
1cc942a4ad
Add nohttp check
2020-01-31 17:31:19 +01:00
Dave Syer
4e1f87407d
Apply spring-format plugin
2020-01-03 11:22:05 +00:00
Dave Syer
5d57e0d5e2
Re-organise mysql scripts so the app runs without root access
...
It works better that way with test containers and in k8s.
2020-01-03 05:29:11 -05:00
Dave Syer
1561eb5506
Add proxyBeanMethods = false
...
It's slightly faster, and we don't need proxies in this app.
2019-11-20 10:21:33 +00:00
Dave Syer
2c98a681ca
Uncomment sql initialization for mysql
2019-11-20 09:56:32 +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