Skip to content
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

add Spring Boot Ehcache (XML configuration) #431

Merged

Conversation

pblanchardie
Copy link
Contributor

@pblanchardie pblanchardie commented Dec 28, 2021

#121 (alternative to #432 )

Here is a version with JSR-107 Ehcache XML configuration.

Getting JSR-107 caches configured through Ehcache XML

Spring Boot Caching with JCache

There are many pros with XML configuration on both the generator and generated sides, but there are probably cons.

Generator:

  • Ehcache
  • Rename to xml-configuration

Generated:

  • ehcache.xml with template for entities
  • jhipster-needle-ehcache-add-entity
    note the explicit "entity" needle because it uses a template to have a shared ttl and max-entries
  • integration test of the configuration? see Supplement JSR-107’s configurations

This is based on a common branch: https://github.com/pblanchardie/jhipster-lite/tree/add-spring-boot-jcache

  • Spring Boot Cache Commons (spring-boot-starter-cache + CacheConfiguration)
  • Spring Boot JCache Commons (jcache)

@pascalgrimaud
Copy link
Member

@pblanchardie : here a tips, you can use fix #121 or close #121 in the 1st comment of the pull request. So the ticket will be closed automatically as soon as the PR is merged

@pblanchardie
Copy link
Contributor Author

@pblanchardie : here a tips, you can use fix #121 or close #121 in the 1st comment of the pull request. So the ticket will be closed automatically as soon as the PR is merged

will do.

@pblanchardie pblanchardie force-pushed the 121-add-spring-boot-ehcache branch 2 times, most recently from afa523e to e8fb938 Compare December 29, 2021 08:55
@pblanchardie pblanchardie changed the title add Spring Boot Ehcache add Spring Boot Ehcache (XML configuration) Dec 29, 2021
@pblanchardie pblanchardie force-pushed the 121-add-spring-boot-ehcache branch from e8fb938 to 6040d2c Compare December 29, 2021 09:16
@codecov
Copy link

codecov bot commented Dec 29, 2021

Codecov Report

Merging #431 (425c03c) into main (b2aac51) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##                main      #431   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
- Complexity       724       735   +11     
===========================================
  Files            137       137           
  Lines           2287      2313   +26     
  Branches          39        39           
===========================================
+ Hits            2287      2313   +26     
Impacted Files Coverage Δ
...ehcache/application/EhcacheApplicationService.java 100.00% <100.00%> (ø)
...erver/springboot/cache/ehcache/domain/Ehcache.java 100.00% <100.00%> (ø)
...oot/cache/ehcache/domain/EhcacheDomainService.java 100.00% <100.00%> (ø)
...e/infrastructure/primary/rest/EhcacheResource.java 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b2aac51...425c03c. Read the comment docs.

@pblanchardie pblanchardie force-pushed the 121-add-spring-boot-ehcache branch 5 times, most recently from 457577a to 73854bf Compare December 29, 2021 12:51
@pblanchardie pblanchardie marked this pull request as ready for review December 29, 2021 14:52
@pblanchardie pblanchardie force-pushed the 121-add-spring-boot-ehcache branch from 73854bf to 58e49d6 Compare December 29, 2021 17:27
@pblanchardie
Copy link
Contributor Author

will rebase

@pascalgrimaud
Copy link
Member

@pblanchardie : should I review the XML one or Configuration one, first ?

@pblanchardie pblanchardie force-pushed the 121-add-spring-boot-ehcache branch from 58e49d6 to a2d2b56 Compare December 30, 2021 09:44
@pblanchardie
Copy link
Contributor Author

this one first, as the second adds another layer : JCache Java Config

@pblanchardie pblanchardie force-pushed the 121-add-spring-boot-ehcache branch from a2d2b56 to 1ed9681 Compare January 1, 2022 21:23
@pblanchardie pblanchardie force-pushed the 121-add-spring-boot-ehcache branch from 1ed9681 to 425c03c Compare January 1, 2022 21:25
@pblanchardie
Copy link
Contributor Author

@pascalgrimaud this one is very very simple ;)

@pascalgrimaud pascalgrimaud merged commit 5cb1f71 into jhipster:main Jan 2, 2022
@pblanchardie pblanchardie deleted the 121-add-spring-boot-ehcache branch January 2, 2022 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants