Skip to content

Merge phucpn1 to master [version 1.0] #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 516 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
516 commits
Select commit Hold shift + click to select a range
856bc53
Merge branch 'refs/heads/76-flyway-deps' into 77-flyway-intit-script
springframeworkguru May 2, 2024
e4a0f0f
Merge branch 'refs/heads/77-flyway-intit-script' into 78-fly-add-column
springframeworkguru May 2, 2024
168bc1a
Merge branch 'refs/heads/78-fly-add-column' into 78.1-fix-integration…
springframeworkguru May 2, 2024
d3f1344
Merge branch 'refs/heads/78.1-fix-integration-tests' into 79-beer-csv…
springframeworkguru May 2, 2024
ca3a344
Merge branch 'refs/heads/master' into 1-lombok-pojos
springframeworkguru Jun 8, 2024
9261805
Merge branch 'refs/heads/1-lombok-pojos' into 2-lombok-builders
springframeworkguru Jun 8, 2024
55cfb5d
Merge branch 'refs/heads/2-lombok-builders' into 3-lombok-constructors
springframeworkguru Jun 8, 2024
8c708a9
Merge branch 'refs/heads/3-lombok-constructors' into 4-lombok-logging
springframeworkguru Jun 8, 2024
0f7afff
Merge branch 'refs/heads/4-lombok-logging' into 5-list-beer
springframeworkguru Jun 8, 2024
8220cea
Merge branch 'refs/heads/5-list-beer' into 6-get-by-id
springframeworkguru Jun 8, 2024
6fc128a
Merge branch 'refs/heads/6-get-by-id' into 7-assn-get-customer
springframeworkguru Jun 8, 2024
b38a5ea
Merge branch 'refs/heads/7-assn-get-customer' into 8-spring-boot-devt…
springframeworkguru Jun 8, 2024
a2fd7a5
Merge branch 'refs/heads/8-spring-boot-devtools' into 9-http-post
springframeworkguru Jun 8, 2024
b3b9648
Merge branch 'refs/heads/9-http-post' into 10-response-header
springframeworkguru Jun 8, 2024
bfc5d92
Merge branch 'refs/heads/10-response-header' into 11-http-post-customer
springframeworkguru Jun 8, 2024
16273ee
Merge branch 'refs/heads/11-http-post-customer' into 12-http-put
springframeworkguru Jun 8, 2024
7e74c60
Merge branch 'refs/heads/12-http-put' into 13-http-put-customer
springframeworkguru Jun 8, 2024
5c0d1d7
Merge branch 'refs/heads/13-http-put-customer' into 14-http-delete
springframeworkguru Jun 8, 2024
a9db7f7
Merge branch 'refs/heads/14-http-delete' into 15-http-delete-customer
springframeworkguru Jun 8, 2024
6a7c5e3
Merge branch 'refs/heads/15-http-delete-customer' into 16-http-patch
springframeworkguru Jun 8, 2024
746c1af
Merge branch 'refs/heads/16-http-patch' into 17-http-patch-customer
springframeworkguru Jun 8, 2024
036ad00
Merge branch 'refs/heads/17-http-patch-customer' into 18-mock-mvc-config
springframeworkguru Jun 8, 2024
13f724d
Merge branch 'refs/heads/18-mock-mvc-config' into 19-mock-mvc-using-m…
springframeworkguru Jun 8, 2024
846afae
Merge branch 'refs/heads/19-mock-mvc-using-mockito' into 20-mock-mvc-…
springframeworkguru Jun 8, 2024
3adf720
Merge branch 'refs/heads/20-mock-mvc-json-path-matchers' into 21-mock…
springframeworkguru Jun 8, 2024
f10c6e6
Merge branch 'refs/heads/21-mock-mvc-test-list-beer' into 22-mock-mvc…
springframeworkguru Jun 8, 2024
fd0c188
Merge branch 'refs/heads/22-mock-mvc-assn-get-customer-test' into 23-…
springframeworkguru Jun 8, 2024
0c4ff8a
Merge branch 'refs/heads/23-mock-mvc-using-jackson' into 24-mock-mvc-…
springframeworkguru Jun 8, 2024
6e32ca3
Merge branch 'refs/heads/24-mock-mvc-create-beer' into 25-mock-mvc-cr…
springframeworkguru Jun 8, 2024
72c8da5
Merge branch 'refs/heads/25-mock-mvc-create-customer' into 26-mock-mv…
springframeworkguru Jun 8, 2024
f1bfcd6
Merge branch 'refs/heads/26-mock-mvc-update-beer' into 27-mock-mvc-up…
springframeworkguru Jun 8, 2024
6843154
Merge branch 'refs/heads/27-mock-mvc-update-customer' into 28-mock-mv…
springframeworkguru Jun 8, 2024
9897695
Merge branch 'refs/heads/28-mock-mvc-delete-beer' into 29-mock-mvc-de…
springframeworkguru Jun 8, 2024
558e2f5
Merge branch 'refs/heads/29-mock-mvc-delete-customer' into 30-mock-mv…
springframeworkguru Jun 8, 2024
91bea7d
Merge branch 'refs/heads/30-mock-mvc-test-patch-beer' into 31-mock-mv…
springframeworkguru Jun 8, 2024
389a28e
Merge branch 'refs/heads/31-mock-mvc-test-patch-customer' into 32-moc…
springframeworkguru Jun 8, 2024
cb07763
Merge branch 'refs/heads/32-mock-mvc-dry-refactor' into 33-mock-mvc-u…
springframeworkguru Jun 8, 2024
6428156
Merge branch 'refs/heads/33-mock-mvc-uri-builder' into 35-mock-mvc-cu…
springframeworkguru Jun 8, 2024
7018dcd
Merge branch 'refs/heads/35-mock-mvc-custom-exception' into 36-mock-m…
springframeworkguru Jun 8, 2024
7e936cb
Merge branch 'refs/heads/36-mock-mvc-exception-handler-method' into 3…
springframeworkguru Jun 8, 2024
9032ee6
Merge branch 'refs/heads/37-mock-mvc-controller-advice' into 37-mock-…
springframeworkguru Jun 8, 2024
f7e2e9c
Merge branch 'refs/heads/37-mock-mvc-response-status-annotation' into…
springframeworkguru Jun 8, 2024
5f4746a
Merge branch 'refs/heads/38-exception-optional' into 39-dto-refactor
springframeworkguru Jun 8, 2024
c1a765c
Merge branch 'refs/heads/39-dto-refactor' into 40-spring-data-jpa-deps
springframeworkguru Jun 8, 2024
6547fd2
Merge branch 'refs/heads/40-spring-data-jpa-deps' into 41-adding-enti…
springframeworkguru Jun 8, 2024
f11b9ff
Merge branch 'refs/heads/41-adding-entities' into 42-uuid-id-generation
springframeworkguru Jun 8, 2024
ca76753
Merge branch 'refs/heads/42-uuid-id-generation' into 43-spring-data-j…
springframeworkguru Jun 8, 2024
4c76ccf
Merge branch 'refs/heads/43-spring-data-jpa-repos' into 44-JPA-test-s…
springframeworkguru Jun 8, 2024
a7cf804
Merge branch 'refs/heads/44-JPA-test-splice' into 45-mapstruct-deps
springframeworkguru Jun 8, 2024
0ae2e40
updating java version in compiler config
springframeworkguru Jun 8, 2024
564513f
Merge branch 'refs/heads/45-mapstruct-deps' into 46-mappers
springframeworkguru Jun 8, 2024
8b2c0b0
Merge branch 'refs/heads/46-mappers' into 47-bootstrap-jpa
springframeworkguru Jun 8, 2024
bd7c3ed
Merge branch 'refs/heads/47-bootstrap-jpa' into 48-jpa-services
springframeworkguru Jun 8, 2024
093dcd3
Merge branch 'refs/heads/48-jpa-services' into 49-get-operations
springframeworkguru Jun 8, 2024
a992e41
Merge branch 'refs/heads/49-get-operations' into 50-controller-integr…
springframeworkguru Jun 8, 2024
d29b766
Merge branch 'refs/heads/50-controller-integration-test' into 51-test…
springframeworkguru Jun 8, 2024
fe601d0
Merge branch 'refs/heads/51-test-for-expected-exception' into 52-jpa-…
springframeworkguru Jun 8, 2024
e14aaa0
Merge branch 'refs/heads/52-jpa-customer-get-ops' into 53-jpa-save-ne…
springframeworkguru Jun 8, 2024
af64025
Merge branch 'refs/heads/53-jpa-save-new-beer' into 54-jpa-update-exi…
springframeworkguru Jun 8, 2024
b3338c8
Merge branch 'refs/heads/54-jpa-update-existing-beer' into 55-update-…
springframeworkguru Jun 8, 2024
a41e8a0
Merge branch 'refs/heads/55-update-beer-not-found' into 56-jpa-delete…
springframeworkguru Jun 8, 2024
a969c84
Merge branch 'refs/heads/56-jpa-delete-by-id' into 57-jpa-delete-by-i…
springframeworkguru Jun 8, 2024
52beec6
Merge branch 'refs/heads/57-jpa-delete-by-id-no-found' into 58-assn-j…
springframeworkguru Jun 8, 2024
ffdccde
Merge branch 'refs/heads/58-assn-jpa-customer-operations' into 59-mvn…
springframeworkguru Jun 8, 2024
e706f87
Merge branch 'refs/heads/59-mvn-validation-deps' into 60-controller-b…
springframeworkguru Jun 8, 2024
e317674
Merge branch 'refs/heads/60-controller-binding-validation' into 61-cu…
springframeworkguru Jun 8, 2024
59222b0
Merge branch 'refs/heads/61-custom-validation-error-handler' into 62-…
springframeworkguru Jun 8, 2024
9de73d9
Merge branch 'refs/heads/62-custom-error-message' into 63-assn-beer-d…
springframeworkguru Jun 8, 2024
2e2f154
Merge branch 'refs/heads/63-assn-beer-dto-validation' into 64-jpa-val…
springframeworkguru Jun 8, 2024
0f25e3b
Merge branch 'refs/heads/64-jpa-validation' into 65-database-constrai…
springframeworkguru Jun 8, 2024
2df50d3
Merge branch 'refs/heads/65-database-constraint-validation' into 66-c…
springframeworkguru Jun 8, 2024
5903270
Merge branch 'refs/heads/66-controller-testing-with-jpa' into 67-jpa-…
springframeworkguru Jun 8, 2024
513bc42
Merge branch 'refs/heads/67-jpa-violoation-error-data' into 68-jpa-va…
springframeworkguru Jun 8, 2024
643079f
Merge branch 'refs/heads/68-jpa-validation-error-msg' into 69-mysql-c…
springframeworkguru Jun 8, 2024
dc18212
Merge branch 'refs/heads/69-mysql-configuration' into 70-mysql-depend…
springframeworkguru Jun 8, 2024
d0979b3
Merge branch 'refs/heads/70-mysql-dependencies' into 71-mysql-profile
springframeworkguru Jun 8, 2024
dde41d8
Merge branch 'refs/heads/71-mysql-profile' into 72-console-log-sql
springframeworkguru Jun 8, 2024
79f0aba
Merge branch 'refs/heads/72-console-log-sql' into 73-jpa-updates-for-…
springframeworkguru Jun 8, 2024
0f69229
Merge branch 'refs/heads/73-jpa-updates-for-mysql' into 74-kikari-dat…
springframeworkguru Jun 8, 2024
d75c0f0
Merge branch 'refs/heads/74-kikari-datasource-pool' into 75-db-create…
springframeworkguru Jun 8, 2024
2673436
Merge branch 'refs/heads/75-db-create-scripts' into 76-flyway-deps
springframeworkguru Jun 8, 2024
ea0c34f
Merge branch 'refs/heads/76-flyway-deps' into 77-flyway-intit-script
springframeworkguru Jun 8, 2024
61c286d
fix for change in hibernate schema validation
springframeworkguru Jun 8, 2024
95ce9da
Merge branch 'refs/heads/77-flyway-intit-script' into 78-fly-add-column
springframeworkguru Jun 8, 2024
21231af
Merge branch 'refs/heads/78-fly-add-column' into 79-beer-csv-data
springframeworkguru Jun 8, 2024
bcbc55d
Merge branch 'master' into 1-lombok-pojos
springframeworkguru Nov 23, 2024
fee8926
Merge branch '1-lombok-pojos' into 2-lombok-builders
springframeworkguru Nov 23, 2024
6bc141b
Merge branch '2-lombok-builders' into 3-lombok-constructors
springframeworkguru Nov 23, 2024
97f6264
Merge branch '3-lombok-constructors' into 4-lombok-logging
springframeworkguru Nov 23, 2024
fcf7f39
Merge branch '4-lombok-logging' into 5-list-beer
springframeworkguru Nov 23, 2024
c6d620c
Merge branch '5-list-beer' into 6-get-by-id
springframeworkguru Nov 23, 2024
58d665c
Merge branch '6-get-by-id' into 7-assn-get-customer
springframeworkguru Nov 23, 2024
47f56ea
Merge branch '7-assn-get-customer' into 8-spring-boot-devtools
springframeworkguru Nov 23, 2024
c6e6ded
Merge branch '8-spring-boot-devtools' into 9-http-post
springframeworkguru Nov 23, 2024
403c696
Merge branch '9-http-post' into 10-response-header
springframeworkguru Nov 23, 2024
9e8cadb
Merge branch '10-response-header' into 11-http-post-customer
springframeworkguru Nov 23, 2024
54082d4
Merge branch '11-http-post-customer' into 12-http-put
springframeworkguru Nov 23, 2024
84d4308
Merge branch '12-http-put' into 13-http-put-customer
springframeworkguru Nov 23, 2024
d7a6c1e
Merge branch '13-http-put-customer' into 14-http-delete
springframeworkguru Nov 23, 2024
3a2bd3b
Merge branch '14-http-delete' into 15-http-delete-customer
springframeworkguru Nov 23, 2024
167e7e4
Merge branch '15-http-delete-customer' into 16-http-patch
springframeworkguru Nov 23, 2024
c9048c2
Merge branch '16-http-patch' into 17-http-patch-customer
springframeworkguru Nov 23, 2024
20e3193
Merge branch '17-http-patch-customer' into 18-mock-mvc-config
springframeworkguru Nov 23, 2024
412f3f8
Merge branch '18-mock-mvc-config' into 19-mock-mvc-using-mockito
springframeworkguru Nov 23, 2024
41fa54c
Update of deprecated @MockBean to @MockitoBean
springframeworkguru Nov 23, 2024
93b2d18
Merge branch '18-mock-mvc-config' into 19-mock-mvc-using-mockito
springframeworkguru Nov 23, 2024
6d98c6c
Merge branch '19-mock-mvc-using-mockito' into 20-mock-mvc-json-path-m…
springframeworkguru Nov 23, 2024
657675e
Merge branch '20-mock-mvc-json-path-matchers' into 21-mock-mvc-test-l…
springframeworkguru Nov 23, 2024
4aacf75
adding tests for customer
springframeworkguru Aug 9, 2022
b9ad158
Merge remote-tracking branch 'origin/22-mock-mvc-assn-get-customer-te…
springframeworkguru Nov 23, 2024
c911029
Merge branch '22-mock-mvc-assn-get-customer-test' into 23-mock-mvc-us…
springframeworkguru Nov 23, 2024
5d6c316
Merge branch '23-mock-mvc-using-jackson' into 24-mock-mvc-create-beer
springframeworkguru Nov 23, 2024
a3a9bef
Merge branch '24-mock-mvc-create-beer' into 25-mock-mvc-create-customer
springframeworkguru Nov 23, 2024
d9c75d3
Merge branch '25-mock-mvc-create-customer' into 26-mock-mvc-update-beer
springframeworkguru Nov 23, 2024
1de54e8
Merge branch '26-mock-mvc-update-beer' into 27-mock-mvc-update-customer
springframeworkguru Nov 23, 2024
e31e82d
Merge branch '27-mock-mvc-update-customer' into 28-mock-mvc-delete-beer
springframeworkguru Nov 23, 2024
b43dc58
Merge branch '28-mock-mvc-delete-beer' into 29-mock-mvc-delete-customer
springframeworkguru Nov 23, 2024
68df929
Merge branch '29-mock-mvc-delete-customer' into 30-mock-mvc-test-patc…
springframeworkguru Nov 23, 2024
fc83e02
Merge branch '30-mock-mvc-test-patch-beer' into 31-mock-mvc-test-patc…
springframeworkguru Nov 23, 2024
3439c73
Merge branch '31-mock-mvc-test-patch-customer' into 32-mock-mvc-dry-r…
springframeworkguru Nov 23, 2024
fef4369
Merge branch '32-mock-mvc-dry-refactor' into 33-mock-mvc-uri-builder
springframeworkguru Nov 23, 2024
dd217bf
Merge branch '33-mock-mvc-uri-builder' into 35-mock-mvc-custom-exception
springframeworkguru Nov 23, 2024
ed12f37
Merge branch '35-mock-mvc-custom-exception' into 36-mock-mvc-exceptio…
springframeworkguru Nov 23, 2024
9ed700b
Merge branch '36-mock-mvc-exception-handler-method' into 37-mock-mvc-…
springframeworkguru Nov 23, 2024
018908f
Merge branch '37-mock-mvc-controller-advice' into 37-mock-mvc-respons…
springframeworkguru Nov 23, 2024
881f58d
Merge branch '37-mock-mvc-response-status-annotation' into 38-excepti…
springframeworkguru Nov 23, 2024
3435e38
Merge branch '38-exception-optional' into 39-dto-refactor
springframeworkguru Nov 23, 2024
fd22ae1
Merge branch '39-dto-refactor' into 40-spring-data-jpa-deps
springframeworkguru Nov 23, 2024
1472e48
Merge branch '40-spring-data-jpa-deps' into 41-adding-entities
springframeworkguru Nov 23, 2024
e285845
Merge branch '41-adding-entities' into 42-uuid-id-generation
springframeworkguru Nov 23, 2024
cd4d295
Update UUID Generator to @UuidGenerator
springframeworkguru Nov 23, 2024
fa960c7
Merge branch '42-uuid-id-generation' into 43-spring-data-jpa-repos
springframeworkguru Nov 23, 2024
13c676b
Merge branch '43-spring-data-jpa-repos' into 44-JPA-test-splice
springframeworkguru Nov 23, 2024
29c2984
Merge branch '44-JPA-test-splice' into 45-mapstruct-deps
springframeworkguru Nov 23, 2024
358338f
Update UUID Generator to @UuidGenerator
springframeworkguru Nov 23, 2024
6630666
Merge branch '45-mapstruct-deps' into 46-mappers
springframeworkguru Nov 23, 2024
7b78597
Merge branch '46-mappers' into 47-bootstrap-jpa
springframeworkguru Nov 23, 2024
8c720d6
Merge branch '47-bootstrap-jpa' into 48-jpa-services
springframeworkguru Nov 23, 2024
7895803
Merge branch '48-jpa-services' into 49-get-operations
springframeworkguru Nov 23, 2024
0742f7a
Merge branch '49-get-operations' into 50-controller-integration-test
springframeworkguru Nov 23, 2024
af90119
Merge branch '50-controller-integration-test' into 51-test-for-expect…
springframeworkguru Nov 23, 2024
c0e33ea
Merge branch '51-test-for-expected-exception' into 52-jpa-customer-ge…
springframeworkguru Nov 23, 2024
07f4a5f
Merge branch '52-jpa-customer-get-ops' into 53-jpa-save-new-beer
springframeworkguru Nov 23, 2024
bb8d589
Merge branch '53-jpa-save-new-beer' into 54-jpa-update-existing-beer
springframeworkguru Nov 23, 2024
964e70d
Merge branch '54-jpa-update-existing-beer' into 55-update-beer-not-found
springframeworkguru Nov 23, 2024
55a785f
Merge branch '55-update-beer-not-found' into 56-jpa-delete-by-id
springframeworkguru Nov 23, 2024
9a5d01e
Merge branch '56-jpa-delete-by-id' into 57-jpa-delete-by-id-no-found
springframeworkguru Nov 23, 2024
3ed4cfd
Merge branch '57-jpa-delete-by-id-no-found' into 58-assn-jpa-customer…
springframeworkguru Nov 23, 2024
611b167
Fix failing tests with UUID load
springframeworkguru Nov 23, 2024
43fcdb2
Merge branch '47-bootstrap-jpa' into 48-jpa-services
springframeworkguru Nov 23, 2024
abe492d
Merge branch '48-jpa-services' into 49-get-operations
springframeworkguru Nov 23, 2024
1fea0dc
Merge branch '49-get-operations' into 50-controller-integration-test
springframeworkguru Nov 23, 2024
2028d67
Merge branch '50-controller-integration-test' into 51-test-for-expect…
springframeworkguru Nov 23, 2024
e370bda
Merge branch '51-test-for-expected-exception' into 52-jpa-customer-ge…
springframeworkguru Nov 23, 2024
c211533
Merge branch '52-jpa-customer-get-ops' into 53-jpa-save-new-beer
springframeworkguru Nov 23, 2024
db91319
Merge branch '53-jpa-save-new-beer' into 54-jpa-update-existing-beer
springframeworkguru Nov 23, 2024
3c81a60
Merge branch '54-jpa-update-existing-beer' into 55-update-beer-not-found
springframeworkguru Nov 23, 2024
d05dde4
Merge branch '55-update-beer-not-found' into 56-jpa-delete-by-id
springframeworkguru Nov 23, 2024
5ada3a9
Merge branch '56-jpa-delete-by-id' into 57-jpa-delete-by-id-no-found
springframeworkguru Nov 23, 2024
c6dff43
Merge branch '57-jpa-delete-by-id-no-found' into 58-assn-jpa-customer…
springframeworkguru Nov 23, 2024
902770e
Merge branch '58-assn-jpa-customer-operations' into 59-mvn-validation…
springframeworkguru Nov 23, 2024
7100046
Merge branch '59-mvn-validation-deps' into 60-controller-binding-vali…
springframeworkguru Nov 23, 2024
94563d6
Merge branch '60-controller-binding-validation' into 61-custom-valida…
springframeworkguru Nov 23, 2024
6a6753f
Merge branch '61-custom-validation-error-handler' into 62-custom-erro…
springframeworkguru Nov 23, 2024
e7cc861
Merge branch '62-custom-error-message' into 63-assn-beer-dto-validation
springframeworkguru Nov 23, 2024
65b72b6
update to use MockitoBean
springframeworkguru Nov 23, 2024
24c84c7
Merge branch '22-mock-mvc-assn-get-customer-test' into 23-mock-mvc-us…
springframeworkguru Nov 23, 2024
73464a0
Merge branch '23-mock-mvc-using-jackson' into 24-mock-mvc-create-beer
springframeworkguru Nov 23, 2024
3b832be
Merge branch '24-mock-mvc-create-beer' into 25-mock-mvc-create-customer
springframeworkguru Nov 23, 2024
1e670a9
Merge branch '25-mock-mvc-create-customer' into 26-mock-mvc-update-beer
springframeworkguru Nov 23, 2024
f3c3562
Merge branch '26-mock-mvc-update-beer' into 27-mock-mvc-update-customer
springframeworkguru Nov 23, 2024
f147447
Merge branch '27-mock-mvc-update-customer' into 28-mock-mvc-delete-beer
springframeworkguru Nov 23, 2024
522ca9d
Merge branch '28-mock-mvc-delete-beer' into 29-mock-mvc-delete-customer
springframeworkguru Nov 23, 2024
7495e8a
Merge branch '29-mock-mvc-delete-customer' into 30-mock-mvc-test-patc…
springframeworkguru Nov 23, 2024
50b5723
Merge branch '30-mock-mvc-test-patch-beer' into 31-mock-mvc-test-patc…
springframeworkguru Nov 23, 2024
250f8a4
Merge branch '31-mock-mvc-test-patch-customer' into 32-mock-mvc-dry-r…
springframeworkguru Nov 23, 2024
d2a19f2
Merge branch '32-mock-mvc-dry-refactor' into 33-mock-mvc-uri-builder
springframeworkguru Nov 23, 2024
b47836b
Merge branch '33-mock-mvc-uri-builder' into 35-mock-mvc-custom-exception
springframeworkguru Nov 23, 2024
f95cadd
Merge branch '35-mock-mvc-custom-exception' into 36-mock-mvc-exceptio…
springframeworkguru Nov 23, 2024
d6aad23
Merge branch '36-mock-mvc-exception-handler-method' into 37-mock-mvc-…
springframeworkguru Nov 23, 2024
898b15d
Merge branch '37-mock-mvc-controller-advice' into 37-mock-mvc-respons…
springframeworkguru Nov 23, 2024
0539aa0
Merge branch '37-mock-mvc-response-status-annotation' into 38-excepti…
springframeworkguru Nov 23, 2024
94ea967
Merge branch '38-exception-optional' into 39-dto-refactor
springframeworkguru Nov 23, 2024
c55007a
Merge branch '39-dto-refactor' into 40-spring-data-jpa-deps
springframeworkguru Nov 23, 2024
a60cbea
adding JPA Entities
springframeworkguru Aug 13, 2022
3dfd4de
Merge remote-tracking branch 'origin/41-adding-entities' into 41-addi…
springframeworkguru Nov 23, 2024
bd8ea18
update to use uuidgenerator
springframeworkguru Nov 23, 2024
65e42f1
Merge branch '42-uuid-id-generation' into 43-spring-data-jpa-repos
springframeworkguru Nov 23, 2024
0ea89fe
Merge branch '43-spring-data-jpa-repos' into 44-JPA-test-splice
springframeworkguru Nov 23, 2024
46b47e6
Merge branch '41-adding-entities' into 42-uuid-id-generation
springframeworkguru Nov 23, 2024
abddc49
Merge branch '42-uuid-id-generation' into 43-spring-data-jpa-repos
springframeworkguru Nov 23, 2024
a7570ed
Merge branch '43-spring-data-jpa-repos' into 44-JPA-test-splice
springframeworkguru Nov 23, 2024
377ede5
Merge branch '44-JPA-test-splice' into 45-mapstruct-deps
springframeworkguru Nov 23, 2024
2b874f1
Merge branch '45-mapstruct-deps' into 46-mappers
springframeworkguru Nov 23, 2024
8fc6323
Merge branch '46-mappers' into 47-bootstrap-jpa
springframeworkguru Nov 23, 2024
bcdb04c
Merge branch '47-bootstrap-jpa' into 48-jpa-services
springframeworkguru Nov 23, 2024
9de7411
Merge branch '48-jpa-services' into 49-get-operations
springframeworkguru Nov 23, 2024
2782314
Merge branch '49-get-operations' into 50-controller-integration-test
springframeworkguru Nov 23, 2024
0dbb5b2
Merge branch '50-controller-integration-test' into 51-test-for-expect…
springframeworkguru Nov 23, 2024
d32ac13
Merge branch '51-test-for-expected-exception' into 52-jpa-customer-ge…
springframeworkguru Nov 23, 2024
442e156
Merge branch '52-jpa-customer-get-ops' into 53-jpa-save-new-beer
springframeworkguru Nov 23, 2024
362ca72
Merge branch '53-jpa-save-new-beer' into 54-jpa-update-existing-beer
springframeworkguru Nov 23, 2024
43f0d09
Merge branch '54-jpa-update-existing-beer' into 55-update-beer-not-found
springframeworkguru Nov 23, 2024
d8af951
Merge branch '55-update-beer-not-found' into 56-jpa-delete-by-id
springframeworkguru Nov 23, 2024
64c54fa
Merge branch '56-jpa-delete-by-id' into 57-jpa-delete-by-id-no-found
springframeworkguru Nov 23, 2024
25cae04
Merge branch '57-jpa-delete-by-id-no-found' into 58-assn-jpa-customer…
springframeworkguru Nov 23, 2024
250e399
Merge branch '58-assn-jpa-customer-operations' into 59-mvn-validation…
springframeworkguru Nov 23, 2024
1d29eb1
Merge branch '59-mvn-validation-deps' into 60-controller-binding-vali…
springframeworkguru Nov 23, 2024
b8aae5d
Merge branch '60-controller-binding-validation' into 61-custom-valida…
springframeworkguru Nov 23, 2024
3978c95
Merge branch '61-custom-validation-error-handler' into 62-custom-erro…
springframeworkguru Nov 23, 2024
2930d34
Merge branch '62-custom-error-message' into 63-assn-beer-dto-validation
springframeworkguru Nov 23, 2024
51019ff
Merge branch '63-assn-beer-dto-validation' into 64-jpa-validation
springframeworkguru Nov 23, 2024
153a90d
Merge branch '64-jpa-validation' into 65-database-constraint-validation
springframeworkguru Nov 23, 2024
22d176c
Merge branch '65-database-constraint-validation' into 66-controller-t…
springframeworkguru Nov 23, 2024
9313427
Merge branch '66-controller-testing-with-jpa' into 67-jpa-violoation-…
springframeworkguru Nov 23, 2024
330479a
Merge branch '67-jpa-violoation-error-data' into 68-jpa-validation-er…
springframeworkguru Nov 23, 2024
e67ac37
Merge branch '68-jpa-validation-error-msg' into 69-mysql-configuration
springframeworkguru Nov 23, 2024
d32732a
adding deps for mysql
springframeworkguru Aug 27, 2022
0fa9390
update mysql dep to to change in Spring Boot 3.0.3
springframeworkguru May 2, 2024
183ba92
Merge remote-tracking branch 'origin/70-mysql-dependencies' into 70-m…
springframeworkguru Nov 23, 2024
251de62
Merge branch '70-mysql-dependencies' into 71-mysql-profile
springframeworkguru Nov 23, 2024
21914dd
Merge branch '71-mysql-profile' into 72-console-log-sql
springframeworkguru Nov 23, 2024
7b8e96f
Merge branch '72-console-log-sql' into 73-jpa-updates-for-mysql
springframeworkguru Nov 23, 2024
727f332
Merge branch '73-jpa-updates-for-mysql' into 74-kikari-datasource-pool
springframeworkguru Nov 23, 2024
5d46a57
Merge branch '74-kikari-datasource-pool' into 75-db-create-scripts
springframeworkguru Nov 23, 2024
a430be4
Merge branch '75-db-create-scripts' into 76-flyway-deps
springframeworkguru Nov 23, 2024
bad5df6
Merge branch '76-flyway-deps' into 77-flyway-intit-script
springframeworkguru Nov 23, 2024
e75ea38
Merge branch '77-flyway-intit-script' into 78-fly-add-column
springframeworkguru Nov 23, 2024
ded3030
fix merge error
springframeworkguru Nov 23, 2024
ba6a5cc
Merge branch '78-fly-add-column' into 78.1-fix-integration-tests
springframeworkguru Nov 23, 2024
3caac4f
Merge branch '78.1-fix-integration-tests' into 79-beer-csv-data
springframeworkguru Nov 23, 2024
b473c54
adding @jdbcTypeCode for UUID values with MySQL
springframeworkguru Nov 26, 2024
025c173
Merge branch '73-jpa-updates-for-mysql' into 74-kikari-datasource-pool
springframeworkguru Nov 26, 2024
c6b4c78
Merge branch '74-kikari-datasource-pool' into 75-db-create-scripts
springframeworkguru Nov 26, 2024
f9795a1
Merge branch '75-db-create-scripts' into 76-flyway-deps
springframeworkguru Nov 26, 2024
2fcdab5
Merge branch '76-flyway-deps' into 77-flyway-intit-script
springframeworkguru Nov 26, 2024
b17fd71
Merge branch '77-flyway-intit-script' into 78-fly-add-column
springframeworkguru Nov 26, 2024
439a079
Merge branch '78-fly-add-column' into 78.1-fix-integration-tests
springframeworkguru Nov 26, 2024
a88e390
adding deps for test containers
springframeworkguru Nov 26, 2024
a775652
adding test with dynamic properties
springframeworkguru Nov 27, 2024
8fb5ca4
refactor to use service connection
springframeworkguru Nov 27, 2024
293a9a4
adding failsafe config and example
springframeworkguru Nov 27, 2024
92dab44
adding docker compose
springframeworkguru Nov 27, 2024
bf96b1a
Merge branch '78.6-Using-Spring-Boot-Docker-Compose' into 79-beer-csv…
springframeworkguru Nov 28, 2024
8a16cb6
[teooi][2025-03-29] beer csv data
phamngocphuc Mar 29, 2025
b9b00e3
adding csv pojo
springframeworkguru Oct 9, 2022
c62ce8f
adding maven dep, initial OpenCSV mapping
springframeworkguru Oct 9, 2022
60f889e
update opencsv version
springframeworkguru May 2, 2024
07d33a2
[phucpn1][2025-03-29] Done CSV Data
phamngocphuc Mar 29, 2025
911a629
[phucpn1][2025-03-30] Done Paging and Sorting with Spring MVC
phamngocphuc Mar 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
services:
mysql:
image: 'mysql:latest'
environment:
- 'MYSQL_DATABASE=mydatabase'
- 'MYSQL_PASSWORD=secret'
- 'MYSQL_ROOT_PASSWORD=verysecret'
- 'MYSQL_USER=myuser'
ports:
- '3306'
101 changes: 100 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,80 @@
<description>spring-6-rest-mvc</description>
<properties>
<java.version>21</java.version>
<org.mapstruct.version>1.5.5.Final</org.mapstruct.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-mysql</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
<version>${org.mapstruct.version}</version>
</dependency>
<dependency>
<groupId>com.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>5.9</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-docker-compose</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-testcontainers</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>mysql</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand All @@ -48,6 +105,48 @@
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<configuration>
<source>21</source>
<target>21</target>
<annotationProcessorPaths>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${org.mapstruct.version}</version>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-mapstruct-binding</artifactId>
<version>0.2.0</version>
</path>
</annotationProcessorPaths>
<compilerArgs>
<compilerArg>-Amapstruct.defaultComponentModel=spring</compilerArg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.5.2</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<repositories>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
package guru.springframework.spring6restmvc.bootstrap;

import guru.springframework.spring6restmvc.entities.Beer;
import guru.springframework.spring6restmvc.entities.Customer;
import guru.springframework.spring6restmvc.model.BeerCSVRecord;
import guru.springframework.spring6restmvc.model.BeerStyle;
import guru.springframework.spring6restmvc.repositories.BeerRepository;
import guru.springframework.spring6restmvc.repositories.CustomerRepository;
import guru.springframework.spring6restmvc.services.BeerCsvService;
import lombok.RequiredArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ResourceUtils;

import java.io.File;
import java.io.FileNotFoundException;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Arrays;
import java.util.List;

/**
* Created by jt, Spring Framework Guru.
*/
@Component
@RequiredArgsConstructor
public class BootstrapData implements CommandLineRunner {
private final BeerRepository beerRepository;
private final CustomerRepository customerRepository;
private final BeerCsvService beerCsvService;

@Transactional
@Override
public void run(String... args) throws Exception {
loadBeerData();
loadCsvData();
loadCustomerData();
}

private void loadCsvData() throws FileNotFoundException {
long count = beerRepository.count();
if (count < 10) {
File file = ResourceUtils.getFile("classpath:csvdata/beers.csv");

List<BeerCSVRecord> recs = beerCsvService.convertCSV(file);

recs.forEach(beerCSVRecord -> {
BeerStyle beerStyle = switch (beerCSVRecord.getStyle()) {
case "American Pale Lager" -> BeerStyle.LAGER;
case "American Pale Ale (APA)", "American Black Ale", "Belgian Dark Ale", "American Blonde Ale" ->
BeerStyle.ALE;
case "American IPA", "American Double / Imperial IPA", "Belgian IPA" -> BeerStyle.IPA;
case "American Porter" -> BeerStyle.PORTER;
case "Oatmeal Stout", "American Stout" -> BeerStyle.STOUT;
case "Saison / Farmhouse Ale" -> BeerStyle.SAISON;
case "Fruit / Vegetable Beer", "Winter Warmer", "Berliner Weissbier" -> BeerStyle.WHEAT;
case "English Pale Ale" -> BeerStyle.PALE_ALE;
default -> BeerStyle.PILSNER;
};

beerRepository.save(Beer.builder()
.beerName(StringUtils.abbreviate(beerCSVRecord.getBeer(), 50))
.beerStyle(beerStyle)
.price(BigDecimal.TEN)
.upc(beerCSVRecord.getRow().toString())
.quantityOnHand(beerCSVRecord.getCount())
.build());
});
}
}

private void loadBeerData() {
if (beerRepository.count() == 0){
Beer beer1 = Beer.builder()
.beerName("Galaxy Cat")
.beerStyle(BeerStyle.PALE_ALE)
.upc("12356")
.price(new BigDecimal("12.99"))
.quantityOnHand(122)
.createdDate(LocalDateTime.now())
.updateDate(LocalDateTime.now())
.build();

Beer beer2 = Beer.builder()
.beerName("Crank")
.beerStyle(BeerStyle.PALE_ALE)
.upc("12356222")
.price(new BigDecimal("11.99"))
.quantityOnHand(392)
.createdDate(LocalDateTime.now())
.updateDate(LocalDateTime.now())
.build();

Beer beer3 = Beer.builder()
.beerName("Sunshine City")
.beerStyle(BeerStyle.IPA)
.upc("12356")
.price(new BigDecimal("13.99"))
.quantityOnHand(144)
.createdDate(LocalDateTime.now())
.updateDate(LocalDateTime.now())
.build();

beerRepository.save(beer1);
beerRepository.save(beer2);
beerRepository.save(beer3);
}

}

private void loadCustomerData() {

if (customerRepository.count() == 0) {
Customer customer1 = Customer.builder()
.name("Customer 1")
.version(1)
.createdDate(LocalDateTime.now())
.updateDate(LocalDateTime.now())
.build();

Customer customer2 = Customer.builder()
.name("Customer 2")
.version(1)
.createdDate(LocalDateTime.now())
.updateDate(LocalDateTime.now())
.build();

Customer customer3 = Customer.builder()
.name("Customer 3")
.version(1)
.createdDate(LocalDateTime.now())
.updateDate(LocalDateTime.now())
.build();

customerRepository.saveAll(Arrays.asList(customer1, customer2, customer3));
}

}


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
package guru.springframework.spring6restmvc.controller;

import guru.springframework.spring6restmvc.model.BeerDTO;
import guru.springframework.spring6restmvc.model.BeerStyle;
import guru.springframework.spring6restmvc.services.BeerService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.domain.Page;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.UUID;

/**
* Created by jt, Spring Framework Guru.
*/
@Slf4j
@RequiredArgsConstructor
@RestController
public class BeerController {

public static final String BEER_PATH = "/api/v1/beer";
public static final String BEER_PATH_ID = BEER_PATH + "/{beerId}";

private final BeerService beerService;

@PatchMapping(BEER_PATH_ID)
public ResponseEntity updateBeerPatchById(@PathVariable("beerId")UUID beerId, @RequestBody BeerDTO beer){

beerService.patchBeerById(beerId, beer);

return new ResponseEntity(HttpStatus.NO_CONTENT);
}

@DeleteMapping(BEER_PATH_ID)
public ResponseEntity deleteById(@PathVariable("beerId") UUID beerId){

if(! beerService.deleteById(beerId)){
throw new NotFoundException();
}

return new ResponseEntity(HttpStatus.NO_CONTENT);
}

@PutMapping(BEER_PATH_ID)
public ResponseEntity updateById(@PathVariable("beerId")UUID beerId, @Validated @RequestBody BeerDTO beer){

if( beerService.updateBeerById(beerId, beer).isEmpty()){
throw new NotFoundException();
}

return new ResponseEntity(HttpStatus.NO_CONTENT);
}

@PostMapping(BEER_PATH)
public ResponseEntity handlePost(@Validated @RequestBody BeerDTO beer){

BeerDTO savedBeer = beerService.saveNewBeer(beer);

HttpHeaders headers = new HttpHeaders();
headers.add("Location", BEER_PATH + "/" + savedBeer.getId().toString());

return new ResponseEntity(headers, HttpStatus.CREATED);
}

@GetMapping(value = BEER_PATH)
public Page<BeerDTO> listBeers(@RequestParam(required = false) String beerName,
@RequestParam(required = false) BeerStyle beerStyle,
@RequestParam(required = false) Boolean showInventory,
@RequestParam(required = false) Integer pageNumber,
@RequestParam(required = false) Integer pageSize){
return beerService.listBeers(beerName, beerStyle, showInventory, pageNumber, pageSize);
}


@GetMapping(value = BEER_PATH_ID)
public BeerDTO getBeerById(@PathVariable("beerId") UUID beerId){

log.debug("Get Beer by Id - in controller");

return beerService.getBeerById(beerId).orElseThrow(NotFoundException::new);
}

}
Loading