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

polish documentation #1602

Merged
merged 4 commits into from
Dec 26, 2024
Merged

polish documentation #1602

merged 4 commits into from
Dec 26, 2024

Conversation

rajadilipkolli
Copy link
Owner

@rajadilipkolli rajadilipkolli commented Dec 26, 2024

Summary by CodeRabbit

  • Documentation
    • Comprehensive updates to the main README.md, including new entries for Grafana LGTM, Mongodb and Elasticsearch Reactive integration, and Opensearch Integration.
    • Enhanced descriptions for existing projects such as Spring Batch Implementation, Chaos Engineering Principles, and Rabbit MQ Implementation.
    • Textual corrections and improvements in the spring-boot-chaos-monkey project README for clarity and consistency.
    • Revised instructions for code formatting, running tests, and executing the application locally in the boot-strategy-plugin README.

Copy link
Contributor

coderabbitai bot commented Dec 26, 2024

Warning

Rate limit exceeded

@rajadilipkolli has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 14 minutes and 22 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 6e77cf2 and da09280.

📒 Files selected for processing (1)
  • README.md (1 hunks)

Walkthrough

This pull request focuses on comprehensive documentation updates for a Spring Boot experiments repository. The primary changes involve enhancing the main README.md file by adding new project entries, refining existing project descriptions, and improving the overall structure and clarity of the documentation. Three new projects have been introduced: Grafana LGTM, Mongodb and Elasticsearch Reactive integration, and Opensearch Integration. Additionally, multiple existing project entries have been expanded with more detailed descriptions and structured lists.

Changes

File Changes
README.md - Added 3 new project entries: Grafana LGTM, Mongodb and Elasticsearch Reactive integration, Opensearch Integration
- Updated descriptions for 15+ existing project entries
- Reformatted table of contents with adjusted indentation
boot-chaos-monkey/README.md - Corrected spelling of "Chaos"
- Minor grammatical improvements
boot-strategy-plugin/ReadMe.md - Added section for code formatting with Spotless
- Updated test command from Gradle to Maven
- Revised local run command to use Docker and Maven

Possibly related PRs

  • rename : move to inner folder #1473: The changes in this PR involve renaming and restructuring paths for components related to keyset pagination, which is also mentioned in the main PR's updates to the README.md regarding "KeySet pagination and dynamic search."
  • feat : change response field from text to name #1490: This PR includes updates to the README.md for the boot-data-window-pagination project, which is related to keyset pagination, aligning with the main PR's focus on enhancing documentation for similar functionalities.
  • polish #1597: This PR focuses on polishing the ArticleController and related tests, which may not directly relate to the main PR but indicates ongoing improvements in documentation and functionality that could be relevant to the overall project context.

Poem

🐰 Hop, hop, through README's land,
Where projects bloom and knowledge expands!
New entries dance, descriptions shine bright,
Our Spring Boot garden, a technological delight!
Documentation's magic, clear and clean,
A rabbit's guide to what code can mean! 🌱


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (7)
boot-chaos-monkey/README.md (4)

6-6: Add alt text to the image for accessibility.

The chaos monkey image should include alternative text for better accessibility.

-![](../images/chaos-monkey.png)
+![Chaos Monkey Logo](../images/chaos-monkey.png)
🧰 Tools
🪛 Markdownlint (0.37.0)

6-6: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


8-8: Improve readability with proper punctuation.

The description paragraph needs better punctuation for improved readability.

-The idea behind this API is to show some of all possibles ways that you can introduce Chaos Engineering principles in a project. Adds Gatling performance tests to demonstrate how adding assaults will cause delay in response and chaos monkey is working as expected .
+The idea behind this API is to show some of the possible ways to introduce Chaos Engineering principles in a project. It adds Gatling performance tests to demonstrate how adding assaults will cause delays in response time and verify that chaos monkey is working as expected.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~8-~8: You might be missing the article “the” here.
Context: ... behind this API is to show some of all possibles ways that you can introduce Chaos Engin...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[uncategorized] ~8-~8: Possible missing comma found.
Context: ...how adding assaults will cause delay in response and chaos monkey is working as expected...

(AI_HYDRA_LEO_MISSING_COMMA)


34-34: Fix grammar in the instruction text.

The instruction text contains a grammatical error.

-By Default, chaos Monkey is enabled, lets disabled and run the tests again. It should improve the response times
+By default, Chaos Monkey is enabled. Let's disable it and run the tests again. It should improve the response times.

58-66: Use proper heading structure for test results.

The test results section uses emphasis (**) for headings. Use proper markdown heading syntax instead.

-we can observe that mean requests/sec is more when chaos monkey is enabled
-
-**With Chaos Monkey enabled**
+We can observe that mean requests/sec is more when Chaos Monkey is enabled.
+
+### With Chaos Monkey Enabled
🧰 Tools
🪛 Markdownlint (0.37.0)

60-60: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


66-66: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

README.md (3)

8-10: Fix TOC indentation for consistency.

The table of contents uses 4-space indentation instead of the standard 2-space indentation.

-    * [Tech Stack](#tech-stack)
-    * [Useful Docker Commands](#useful-docker-commands)
-    * [Useful git Commands](#useful-git-commands)
+  * [Tech Stack](#tech-stack)
+  * [Useful Docker Commands](#useful-docker-commands)
+  * [Useful git Commands](#useful-git-commands)
🧰 Tools
🪛 Markdownlint (0.37.0)

8-8: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


9-9: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


10-10: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


42-43: Fix abbreviation formatting.

The abbreviation "i.e." should include periods for proper formatting.

-| [MultiTenancy Partition Based](./jpa/multitenancy/partition)                                                            | This application, demonstrates running multi tenancy in JPA using partition based i.e Shared Database with Shared table                                                                                                                                                                                                                                                     | Completed |
-| [MultiTenancy Schema Based](./jpa/multitenancy/schema)                                                                  | This application, demonstrates running multi tenancy in JPA using schema based i.e Shared Database with Separate Schema                                                                                                                                                                                                                                                     | Completed |
+| [MultiTenancy Partition Based](./jpa/multitenancy/partition)                                                            | This application, demonstrates running multi tenancy in JPA using partition based (i.e., Shared Database with Shared table)                                                                                                                                                                                                                                                     | Completed |
+| [MultiTenancy Schema Based](./jpa/multitenancy/schema)                                                                  | This application, demonstrates running multi tenancy in JPA using schema based (i.e., Shared Database with Separate Schema)                                                                                                                                                                                                                                                     | Completed |
🧰 Tools
🪛 LanguageTool

[uncategorized] ~42-~42: The abbreviation “i.e.” (= that is) requires two periods.
Context: ...ti tenancy in JPA using partition based i.e Shared Database with Shared table ...

(I_E)


[uncategorized] ~43-~43: The abbreviation “i.e.” (= that is) requires two periods.
Context: ...multi tenancy in JPA using schema based i.e Shared Database with Separate Schema ...

(I_E)


17-17: Remove hard tabs from the table header.

The table header contains hard tabs which should be replaced with spaces for consistency.

Replace hard tabs with spaces in the table header row.

🧰 Tools
🪛 Markdownlint (0.37.0)

17-17: Column: 137
Hard tabs

(MD010, no-hard-tabs)


17-17: Column: 498
Hard tabs

(MD010, no-hard-tabs)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6c4ee6c and 23fd52e.

⛔ Files ignored due to path filters (1)
  • images/chaos-monkey.png is excluded by !**/*.png
📒 Files selected for processing (2)
  • README.md (1 hunks)
  • boot-chaos-monkey/README.md (3 hunks)
🧰 Additional context used
🪛 LanguageTool
boot-chaos-monkey/README.md

[uncategorized] ~8-~8: You might be missing the article “the” here.
Context: ... behind this API is to show some of all possibles ways that you can introduce Chaos Engin...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[uncategorized] ~8-~8: Possible missing comma found.
Context: ...how adding assaults will cause delay in response and chaos monkey is working as expected...

(AI_HYDRA_LEO_MISSING_COMMA)

README.md

[uncategorized] ~42-~42: The abbreviation “i.e.” (= that is) requires two periods.
Context: ...ti tenancy in JPA using partition based i.e Shared Database with Shared table ...

(I_E)


[uncategorized] ~43-~43: The abbreviation “i.e.” (= that is) requires two periods.
Context: ...multi tenancy in JPA using schema based i.e Shared Database with Separate Schema ...

(I_E)

🪛 Markdownlint (0.37.0)
boot-chaos-monkey/README.md

6-6: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


60-60: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


66-66: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

README.md

8-8: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


9-9: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


10-10: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


17-17: Column: 137
Hard tabs

(MD010, no-hard-tabs)


17-17: Column: 498
Hard tabs

(MD010, no-hard-tabs)

Copy link
Contributor

github-actions bot commented Dec 26, 2024

Qodana Community for JVM

97 new problems were found

Inspection name Severity Problems
Unchecked warning 🔶 Warning 32
@NotNull/@Nullable problems 🔶 Warning 30
'equals()' method which does not check class of parameter 🔶 Warning 21
Nullability and data flow problems 🔶 Warning 3
Field can be local 🔶 Warning 3
Declaration has problems in Javadoc references 🔶 Warning 2
AutoCloseable used without 'try'-with-resources 🔶 Warning 1
Class is exposed outside of its visibility scope 🔶 Warning 1
Javadoc declaration problems 🔶 Warning 1
Mismatched query and update of collection 🔶 Warning 1
Optional.get() is called without isPresent() check 🔶 Warning 1
Commented out code ◽️ Notice 1

☁️ View the detailed Qodana report

Contact Qodana team

Contact us at [email protected]

README.md Outdated
| [spring-boot-graphql-webmvc](./graphql/boot-graphql-webmvc) | The application, demonstrates how to apply graphql concepts to the spring boot project | WIP |
| [Custom SequenceNumber and LazyConnectionDataSourceProxy for db connection improvement](./jpa/boot-data-customsequence) | This application demonstrates: Custom sequence generation, Database connection optimization using datasource-proxy and LazyConnectionDataSourceProxy with MariaDB, SQL query validation using SQLStatementCountValidator, Dynamic validation using ValidationGroups | Completed |
| [KeySet pagination and dynamic search](./jpa/keyset-pagination/blaze-persistence) | Implements KeySet Pagination using Blaze Persistence and enable dynamic search using specifications | Completed |
| Name | Description | Status |
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coderabbitai, please review the Description of all rows in this table and suggest improvements to make is more clear

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rajadilipkolli, here’s a clearer, more concise set of descriptions for each entry in the table, following a consistent style:

  1. Spring Batch Implementation
    Demonstrates how to use Spring Batch 5 with a straightforward configuration, generate batch tables via Liquibase, and produce an SBOM (Software Bill of Materials).

  2. Archunit Implementation
    Shows how to enforce architectural constraints in a Spring Boot project using ArchUnit rules.

  3. Chaos Engineering Principles
    Covers applying Chaos Engineering with Spring Boot, along with performance testing via Gatling to highlight the impact of chaos experiments.

  4. Grafana LGTM
    Demonstrates an observability stack with Loki, Grafana, Tempo, and Mimir to handle metrics, traces, and logs in a Spring Boot context.

  5. Mongodb and Elasticsearch Reactive Integration
    Illustrates storing data in MongoDB, then retrieving it using reactive ElasticSearch for quick, geospatial, and reactive-based searches.

  6. Opensearch Integration
    Showcases saving data and performing swift geospatial searches in OpenSearch as an ElasticSearch alternative.

  7. Rabbit Mq Implementation
    Demonstrates RabbitMQ producer acknowledgments, a Dead Letter Queue setup, and a Thymeleaf-powered UI.

  8. Rest API Documentation with Examples
    Highlights generating PDF documentation of RESTful APIs using Spring REST Docs.

  9. Implementation of Strategy Design Pattern
    Uses the Strategy Pattern within a Spring application, builds a native image with GraalVM, and provides a main class to launch the application natively.

  10. Feature Toggles
    Demonstrates toggling specific features on or off at runtime in a Spring Boot project.

  11. Ultimate Redis Implementation
    Explores multiple Redis usage patterns with varying time-to-live (TTL) settings, including querying data via Spring Data Redis.

  12. Graph QL Implementation using QueryDSL
    Illustrates integrating GraphQL with QueryDSL to interact with a database in a Spring application.

  13. Graph QL Implementation using Webflux
    Showcases using GraphQL alongside the reactive WebFlux stack for asynchronous data retrieval.

  14. Graph QL Implementation using WebMVC
    Demonstrates applying GraphQL concepts with the traditional Spring MVC for synchronous data handling.

  15. Custom SequenceNumber and LazyConnectionDataSourceProxy for DB Connection Improvement
    Highlights creating custom sequence generators, optimizing database connections with LazyConnectionDataSourceProxy, observing SQL statements via datasource-proxy, and validating queries in integration tests.

  16. Hibernate Envers Implementation using Spring Data JPA
    Shows how to track entity revisions with Hibernate Envers and monitor system health, triggering alerts on high CPU usage or downtime.

  17. Connecting to Multiple Data Sources
    Demonstrates configuring multiple SQL databases in a single Spring Boot application, handling connection pools, and running both Liquibase and Flyway migrations.

  18. Hibernate 2nd Level Cache Using Redis
    Explains configuring Hibernate’s second-level caching via Redis and testing using query counting, with a custom repository approach.

  19. Read Replica Postgres with Connection Optimization
    Illustrates writing data to a primary Postgres database, then reading from a replica using LazyConnectionDataSourceProxy for improved performance.

  20. KeySet Pagination and Dynamic Search with Blaze
    Implements keyset pagination using Blaze Persistence, adding dynamic query filters with specifications.

  21. KeySet Pagination and Dynamic Search with Spring Data JPA
    Implements keyset pagination using Spring Data JPA, enabling dynamic queries through JPA specifications.

  22. MultiTenancy with Multiple Data Sources
    Provides examples of running multi-tenant applications under different strategies, each with its own data source.

  23. MultiTenancy DB Based
    Demonstrates having each tenant use a separate database (while sharing the same schema design).

  24. MultiTenancy Partition Based
    Shows how to share a single database and table across tenants using a partition-based approach.

  25. MultiTenancy Schema Based
    Demonstrates isolating tenants by allocating a separate schema for each tenant within the same database.

  26. Reactive SQL with JOOQ
    Explains performing reactive CRUD operations in Spring Boot using jOOQ.

  27. Reactive Cache with Redis
    Demonstrates caching reactive database operations in Redis to boost performance.

  28. Reactive Application
    Illustrates an end-to-end reactive CRUD workflow in Spring Boot using R2DBC.

  29. Background Jobs and Scheduling Using JobRunr
    Sets up background job scheduling with JobRunr for asynchronous task execution.

  30. Scheduling Using Quartz
    Showcases the Quartz scheduler, providing a Thymeleaf UI to pause, resume, create, and delete scheduled tasks.

  31. Scheduling Using Database Distributed Locks with ShedLock
    Demonstrates scheduling while ensuring only one active instance at a time via ShedLock.

Above is a proposed style to keep each description concise and consistent. Feel free to further tailor any wording based on specific technical depth or intended audience.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coderabbiai, can you please help me to update all ReadMe files in the submodule so anyone can understand what that project is doing and provides as much details as possible.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (5)
boot-strategy-plugin/ReadMe.md (1)

13-14: Update build badge to reflect Maven usage.

The test command has been updated from Gradle to Maven, but the build badge at the top of the README still shows Gradle status.

boot-chaos-monkey/README.md (2)

6-6: Add alt text to the image for accessibility.

The chaos monkey image should include alt text for better accessibility.

-![](../images/chaos-monkey.png)
+![Chaos Monkey Architecture Diagram](../images/chaos-monkey.png)
🧰 Tools
🪛 Markdownlint (0.37.0)

6-6: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


66-66: Use proper heading formatting for test results section.

Replace emphasis with proper heading markdown syntax.

-**With Chaos Monkey disabled**
+### With Chaos Monkey disabled
🧰 Tools
🪛 Markdownlint (0.37.0)

66-66: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

README.md (2)

8-10: Fix TOC indentation for consistency.

The TOC items should have consistent indentation of 2 spaces.

-    * [Tech Stack](#tech-stack)
-    * [Useful Docker Commands](#useful-docker-commands)
-    * [Useful git Commands](#useful-git-commands)
+  * [Tech Stack](#tech-stack)
+  * [Useful Docker Commands](#useful-docker-commands)
+  * [Useful git Commands](#useful-git-commands)
🧰 Tools
🪛 Markdownlint (0.37.0)

8-8: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


9-9: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


10-10: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


17-17: Fix hard tabs in table formatting.

Replace hard tabs with spaces in the table header for consistent rendering across platforms.

-| Name                                                                                                                    | Description 		                                                                                                                                                                                                                                                                                                                                                              | Status 		 |
+| Name                                                                                                                    | Description                                                                                                                                                                                                                                                                                                                                                                | Status    |
🧰 Tools
🪛 Markdownlint (0.37.0)

17-17: Column: 137
Hard tabs

(MD010, no-hard-tabs)


17-17: Column: 498
Hard tabs

(MD010, no-hard-tabs)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 23fd52e and 9e8b9b0.

📒 Files selected for processing (3)
  • README.md (1 hunks)
  • boot-chaos-monkey/README.md (3 hunks)
  • boot-strategy-plugin/ReadMe.md (1 hunks)
🧰 Additional context used
🪛 Markdownlint (0.37.0)
boot-strategy-plugin/ReadMe.md

5-5: Expected: h2; Actual: h3
Heading levels should only increment by one level at a time

(MD001, heading-increment)

README.md

8-8: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


9-9: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


10-10: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


17-17: Column: 137
Hard tabs

(MD010, no-hard-tabs)


17-17: Column: 498
Hard tabs

(MD010, no-hard-tabs)

boot-chaos-monkey/README.md

6-6: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


66-66: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

🔇 Additional comments (4)
boot-strategy-plugin/ReadMe.md (2)

5-9: LGTM: Clear formatting instructions added.

The new "Format code" section with the spotless command provides clear instructions for code formatting.

🧰 Tools
🪛 Markdownlint (0.37.0)

5-5: Expected: h2; Actual: h3
Heading levels should only increment by one level at a time

(MD001, heading-increment)


19-21: LGTM: Clear local development setup instructions.

The local run section now properly sequences the steps:

  1. Start dependencies with Docker Compose
  2. Run the application with Maven and local profile
boot-chaos-monkey/README.md (1)

8-8: LGTM: Clear project description.

The enhanced description clearly explains the purpose and implementation details of the Chaos Engineering principles.

README.md (1)

17-50: LGTM: Comprehensive project descriptions.

The project descriptions have been significantly enhanced with:

  • Structured lists using <ol> tags
  • Clear categorization of features
  • Consistent status indicators
🧰 Tools
🪛 Markdownlint (0.37.0)

17-17: Column: 137
Hard tabs

(MD010, no-hard-tabs)


17-17: Column: 498
Hard tabs

(MD010, no-hard-tabs)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (3)
README.md (3)

8-10: Fix list indentation in TOC.

The unordered list items in the Table of Contents should have consistent indentation of 2 spaces instead of 4.

* [spring boot integration experiments](#spring-boot-integration-experiments)
-    * [Tech Stack](#tech-stack)
-    * [Useful Docker Commands](#useful-docker-commands)
-    * [Useful git Commands](#useful-git-commands)
+  * [Tech Stack](#tech-stack)
+  * [Useful Docker Commands](#useful-docker-commands)
+  * [Useful git Commands](#useful-git-commands)
🧰 Tools
🪛 Markdownlint (0.37.0)

8-8: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


9-9: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


10-10: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


17-17: Replace hard tabs with spaces in the table header.

The table header contains hard tabs that should be replaced with spaces for consistent formatting.

-| Name                                                                                                                    | Description 		                                                                                                                                                                                                                                                                                                                              | Status 		 |
+| Name                                                                                                                    | Description                                                                                                                                                                                                                                                                                                                                    | Status    |
🧰 Tools
🪛 Markdownlint (0.37.0)

17-17: Column: 137
Hard tabs

(MD010, no-hard-tabs)


17-17: Column: 466
Hard tabs

(MD010, no-hard-tabs)


33-33: Use standard Markdown list format instead of HTML tags.

Replace HTML <ol> tags with standard Markdown numbered list format for better compatibility across different Markdown viewers.

-| [Custom SequenceNumber and LazyConnectionDataSourceProxy for db connection improvement](./jpa/boot-data-customsequence) | <ol>Highlights creating custom sequence generators</ol> <ol> Optimizing database connections with `LazyConnectionDataSourceProxy`</ol> <ol> Observing SQL statements via `datasource-proxy`, and validating queries in integration tests using `SQLStatementCountValidator`</ol> <ol> Dynamic input validation using ValidationGroups </ol> | Completed |
+| [Custom SequenceNumber and LazyConnectionDataSourceProxy for db connection improvement](./jpa/boot-data-customsequence) | 1. Highlights creating custom sequence generators\n2. Optimizing database connections with `LazyConnectionDataSourceProxy`\n3. Observing SQL statements via `datasource-proxy`, and validating queries in integration tests using `SQLStatementCountValidator`\n4. Dynamic input validation using ValidationGroups | Completed |
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9e8b9b0 and 6e77cf2.

📒 Files selected for processing (1)
  • README.md (1 hunks)
🧰 Additional context used
🪛 Markdownlint (0.37.0)
README.md

8-8: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


9-9: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


10-10: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


17-17: Column: 137
Hard tabs

(MD010, no-hard-tabs)


17-17: Column: 466
Hard tabs

(MD010, no-hard-tabs)

🔇 Additional comments (2)
README.md (2)

22-24: LGTM - New project entries are well documented!

The new entries for Grafana LGTM, MongoDB/Elasticsearch integration, and OpenSearch Integration are clearly described with their specific functionalities and use cases.


Line range hint 1-50: Documentation improvements look great!

The enhanced project descriptions provide clear, actionable information about each module's functionality and purpose. The consistent structure makes it easy for users to understand the repository's contents.

🧰 Tools
🪛 Markdownlint (0.37.0)

8-8: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


9-9: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


10-10: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


17-17: Column: 137
Hard tabs

(MD010, no-hard-tabs)


17-17: Column: 466
Hard tabs

(MD010, no-hard-tabs)

@rajadilipkolli
Copy link
Owner Author

@coderabbitai, please help me to update all ReadMe.md files present in this repo to provide more context and as much details as possible

Copy link
Contributor

coderabbitai bot commented Dec 26, 2024

@rajadilipkolli, below are example enriched README.md contents for each directory, consolidated in one place for convenience. Each has additional context, usage details, references, and explanations beyond the original. Feel free to revise, pick, or merge these sections as you see fit.


Updated README.md (Root)

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/rajadilipkolli/my-spring-boot-experiments)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

# Spring Boot Integration Experiments

This repository contains a collection of sample projects and experiments showcasing various Spring Boot integrations and features. The goal is to help you explore new possibilities, demonstrate best practices, and learn advanced concepts in a unified space.

---

## Table of Contents
- [Overview](#overview)
- [Projects](#projects)
- [Tech Stack](#tech-stack)
- [Useful Docker Commands](#useful-docker-commands)
- [Useful Git Commands](#useful-git-commands)

---

## Overview

Each subdirectory in this repository demonstrates a focused aspect of Spring Boot development ranging from database integrations, caching, messaging, and multi-tenancy to advanced topics like Chaos Engineering and reactive stacks. Many of these samples are production ready, while some are still works-in-progress (WIP) intended for demonstration or experimentation.

**Key Features**:
1. **Wide Range of Integrations**: Explore different databases (MySQL, PostgreSQL, MongoDB, Oracle), caching with Redis, and advanced topics like multi-tenancy.
2. **Observability & Monitoring**: Many samples include Prometheus, Grafana, or Kibana. They demonstrate setting up and analyzing application performance in real time.
3. **Scalability & Resilience Patterns**: Investigate chaos monkey for injecting controlled failures, or look at multi-database solutions for horizontal scaling.

---

## Projects

Below is a quick lookup table summarizing each sub-project. For more details, consult their individual README.md files.

| Project & Link                                                                                                     | Description                                                                                                                              | Status      |
|-------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------|------------|
| [Spring Batch Implementation](./batch-boot-jpa-sample)                                                            | Demonstrates Spring Batch 5 with SBOM generation, straightforward configuration.                                                         | Completed  |
| [Boot API ArchUnit Sample](./boot-api-archunit-sample)                                                            | Showcases architectural constraints using ArchUnit rules.                                                                                 | Completed  |
| [Chaos Engineering with Chaos Monkey](./boot-chaos-monkey)                                                        | Applies Chaos Engineering principles in a Spring Boot app. Includes Gatling performance testing.                                          | WIP        |
| [Grafana LGTM Stack](./boot-grafana-lgtm)                                                                         | Implements Loki, Grafana, Tempo, Mimir for observability, metrics, traces.                                                                | Completed  |
| [MongoDB & Elasticsearch Reactive](./boot-mongodb-elasticsearch)                                                  | Integrates reactive MongoDB with reactive Elasticsearch. Demonstrates advanced queries and geospatial search.                             | WIP        |
| [OpenSearch Integration](./boot-opensearch-sample)                                                                | Illustrates saving data and quick geospatial queries in OpenSearch.                                                                       | Completed  |
| [RabbitMQ Implementation](./boot-rabbitmq-thymeleaf)                                                              | Showcases reliable messaging, DLQ, a basic Thymeleaf UI, and producer confirmations.                                                      | Completed  |
| [REST API Docs Sample](./boot-rest-docs-sample)                                                                   | Generates PDF REST API documentation using Spring REST Docs.                                                                              | Completed  |
| [Strategy Design Pattern](./boot-strategy-plugin)                                                                 | Explores the Strategy Pattern with a Spring application, building a native image via GraalVM.                                             | Completed  |
| [Feature Toggles (Togglz)](./boot-togglz-sample)                                                                  | Dynamically enables/disables features at runtime using Togglz.                                                                            | Completed  |
| [Ultimate Redis Implementation](./boot-ultimate-redis)                                                            | Demonstrates advanced Redis usage patterns, sentinel support, TTL management, and cluster connections.                                   | Completed  |
| [GraphQL w/ QueryDSL](./graphql/boot-graphql-querydsl)                                                            | Integrates GraphQL with QueryDSL for advanced query generation.                                                                           | WIP        |
| [GraphQL w/ WebFlux](./graphql/boot-graphql-webflux)                                                              | Builds asynchronous data retrieval using GraphQL and reactive WebFlux stack.                                                              | Completed  |
| [GraphQL w/ Spring MVC](./graphql/boot-graphql-webmvc)                                                            | Combines classic Spring MVC with GraphQL for synchronous data handling.                                                                   | WIP        |
| [Custom Sequence & LazyConnectionDataSourceProxy](./jpa/boot-data-customsequence)                                 | Explores custom sequence generators, lazy DB connections, logging SQL statements, dynamic input validations, etc.                         | Completed  |
| [Hibernate Envers (Spring Data)](./jpa/boot-data-envers)                                                          | Audits entity changes through Hibernate Envers, also demonstrates advanced monitoring.                                                    | Completed  |
| [Multiple Data Sources](./jpa/boot-data-multipledatasources)                                                      | Demonstrates connecting to multiple SQL databases in the same Spring Boot app.                                                            | Completed  |
| [Hibernate 2nd Level Cache Redis](./jpa/boot-hibernate2ndlevelcache-sample)                                       | Enables second-level caching via Redis for improved performance, tested with custom repositories.                                         | Completed  |
| [Read Replica Postgres Setup](./jpa/boot-read-replica-postgresql)                                                 | Illustrates read/write separation with primary/replica in Postgres, optimizing connections with `LazyConnectionDataSourceProxy`.          | Completed  |
| [Keyset Pagination (Blaze Persistence)](./jpa/keyset-pagination/blaze-persistence)                                | Demonstrates efficient paging with dynamic queries.                                                                                       | Completed  |
| [Keyset Pagination (Spring Data JPA)](./jpa/keyset-pagination/boot-data-window-pagination)                        | Offers another approach to keyset pagination with JPA.                                                                                    | Completed  |
| [MultiTenancy with Multiple DataSources](./jpa/multitenancy/multidatasource-multitenancy)                         | Explores multi-tenant architecture using multiple data sources.                                                                           | Completed  |
| [MultiTenancy: DB-based](./jpa/multitenancy/multitenancy-db)                                                      | Assigns a dedicated database for each tenant.                                                                                             | Completed  |
| [MultiTenancy: Partition-based](./jpa/multitenancy/partition)                                                     | Stores data for multiple tenants in a single table, partitioned by tenant ID.                                                             | Completed  |
| [MultiTenancy: Schema-based](./jpa/multitenancy/schema)                                                           | Creates separate schemas for each tenant within one database.                                                                             | Completed  |
| [Reactive SQL with jOOQ](./r2dbc/boot-jooq-r2dbc-sample)                                                          | Combines jOOQ with R2DBC for fully reactive SQL operations.                                                                               | Completed  |
| [Reactive Cache with Redis](./r2dbc/boot-r2dbc-reactive-cache)                                                    | Demonstrates caching reactive database calls for performance gains.                                                                       | Completed  |
| [Reactive CRUD with R2DBC](./r2dbc/boot-r2dbc-sample)                                                             | Shows end-to-end reactive CRUD workflow using R2DBC.                                                                                      | Completed  |
| [BackgroundJobs w/ JobRunr](./scheduler/boot-scheduler-jobrunr)                                                   | Sets up background job scheduling for asynchronous tasks using JobRunr.                                                                   | Completed  |
| [Scheduling w/ Quartz](./scheduler/boot-scheduler-quartz)                                                         | Implements Quartz-based scheduling with a Thymeleaf UI for controlling these jobs.                                                        | Completed  |
| [Scheduling DB Distributed Locks with ShedLock](./scheduler/boot-scheduler-shedlock)                              | Ensures only one job runs across multiple instances using ShedLock.                                                                       | Completed  |

---

## Tech Stack

This repository leverages a broad stack of technologies, including:

- **Java** / **JavaScript** / **SQL** for core logic & data.  
- **Spring Framework** (Boot, Data, Security, etc.) as the key application framework.  
- **Project Reactor** for reactive data flows and concurrency.  
- **QueryDSL**, **Liquibase**, **Flyway**, **JOOQ** for advanced database interactions and migrations.  
- **Docker**, **Docker Compose** for containerization and multi-service orchestration.  
- **RabbitMQ**, **Redis**, **Elasticsearch**, **OpenSearch**, **MongoDB** for messaging, caching, and search.  
- **Gradle** / **Maven** for builds and dependency management.  
- **GitHub Actions**, **CircleCI**, **Jenkins** for CI/CD pipelines.

For in-depth version references, visit [techstack.md](/techstack.md) or see individual project READMEs.

---

## Useful Docker Commands

```shell
# Start Postgres and pgAdmin
docker compose up postgres pgadmin4

# Clean up everything
docker system prune -a -f --volumes

# Remove unused volumes
docker volume prune

# List running containers
docker container ls

Useful Git Commands

# Temporarily stash local changes
git stash

# Pull remote changes
git pull

# Revert a specific commit by its hash
git revert <commit-hash>

Additional Resources:

  • Project Webpage
  • For a deeper architecture discussion, check out each subfolder’s README or the issues/PR discussions.


Updated boot-chaos-monkey/README.md

# Spring Boot Chaos Monkey

This module explores Chaos Engineering principles by intentionally injecting failures into a Spring Boot application to test its resilience. It demonstrates how to set up and integrate `chaos-monkey-spring-boot` for your microservices, as well as performance testing with Gatling to measure any degradation under chaos scenarios.

## Key Features

1. **Chaos Injection**: Simulate random latencies, exceptions, or resources unavailability.
2. **Performance Testing** (Gatling): Benchmark throughput and latency under chaotic conditions.
3. **Monitoring**: Validate that chaos is functioning by observing logs, metrics, or custom dashboards.

## Setup & Usage

1. **Build**:
   ```shell
   ./mvnw clean verify
  1. Run:

    docker-compose -f docker/docker-compose.yml up -d
    ./mvnw spring-boot:run -Dspring-boot.run.profiles=local
  2. Chaos Configuration:
    In application.yml, enable Chaos Monkey toggles to define the types of chaos (latency, exception, memory).

  3. Verification:

    • Check logs to confirm chaos injection events.
    • Use Gatling or other load testing tools to verify how the application behaves under stress.

Useful Links

  • Swagger UI: http://localhost:8080/swagger-ui.html
  • Actuator: http://localhost:8080/actuator
  • Additional chaos docs: Chaos Monkey for Spring Boot

Advanced Tips & Tricks

  • Selective Chaos: You can limit chaos to specific package patterns or even particular methods.
  • Toggle Chaos: Chaos can be toggled on/off at runtime if you integrate with a feature flipping library like Togglz.

---

## Updated **boot-strategy-plugin/ReadMe.md**

```markdown
# Boot Strategy Plugin

This project demonstrates the Strategy Design Pattern in a Spring Boot application. It also shows how to build a native image with GraalVM for faster startup and reduced memory usage.

## Key Features

1. **Strategy Pattern**: Encapsulates multiple algorithms or behaviors behind a common interface, providing an extensible way to switch strategies at runtime.
2. **Native Image**: Provides an example of producing a GraalVM native executable.
3. **Docker Compose**: Containerizes any dependencies (like databases or external services) to facilitate local development.

## Format Code

```shell
./mvnw spotless:apply

Run Tests

./mvnw clean verify

Run Locally

docker-compose -f docker/docker-compose.yml up -d
./mvnw spring-boot:run -Dspring-boot.run.profiles=local

Building a Native Image

./mvnw native:compile -Pnative

References


---

## Updated **boot-chaos-monkey/README.md** was already provided above, so moving on...

(For brevity, the samples below follow the same structure. If you have numerous subprojects, you can replicate the pattern: overview, usage, links, references, advanced considerations.)

---

## Updated **boot-mongodb-elasticsearch/README.md**

```markdown
# MongoDB and Elasticsearch Reactive Integration

Integrates a reactive MongoDB backend with a reactive Elasticsearch instance for enhanced real-time searching capabilities, including geospatial queries.

## Highlights

- **Reactive Streams Approach**: Uses Spring Data’s reactive driver for both MongoDB and Elasticsearch.
- **Advanced Queries**: Demonstrates geospatial searches, text-indexed searches, and filtering in near real-time.
- **Scalable Architecture**: Docker-compose-based environment for local testing.

## Running Locally

```shell
docker-compose -f docker/docker-compose.yml up -d
./mvnw spring-boot:run -Dspring-boot.run.profiles=local

Testing

./mvnw clean verify

Notes

  • Make sure your system has adequate resources to run MongoDB and Elasticsearch simultaneously.
  • For customized analyzers or index configurations, check application.yml or the code-based index settings.

Useful Links


---

## Updated **boot-opensearch-sample/README.md**

```markdown
# OpenSearch Integration

Showcases saving data and performing swift geospatial or text-based searches in OpenSearch as an alternative to Elasticsearch.

## Key Features

- **OpenSearch Client**: Illustrates setting up a Spring Boot app to send documents to an OpenSearch cluster.
- **Geospatial Queries**: Provides examples of storing and querying location-based data.
- **High Throughput**: Demonstrates efficient indexing and search operations.

## Quick Start

```shell
docker-compose -f docker/docker-compose.yml up -d
./mvnw spring-boot:run -Dspring-boot.run.profiles=local

Querying

You can use either:

  • Swagger UI for built-in endpoints.
  • Kibana Dashboards or OpenSearch Dashboards for manual searching.

Testing

./mvnw clean verify

Additional Info


---

## Updated **boot-read-replica-postgresql/README.md**

```markdown
# Boot Read-Replica with PostgreSQL

This project demonstrates how to configure and leverage a primary (writer) and read replica (reader) in PostgreSQL to scale out read operations in Spring Boot.

## Key Concepts

1. **Primary-Replica Setup**: Writes go to the primary database, while reads occur on the replica.
2. **Performance Optimization**: Minimizes load on the primary, improving overall throughput.
3. **LazyConnectionDataSourceProxy**: Ensures a single `DataSource` bean but dynamically determines read vs. write at runtime.

## Quick Start

```shell
docker-compose -f docker/docker-compose.yml up -d
./mvnw spring-boot:run -Dspring-boot.run.profiles=local

This boots up a Postgres primary, a replica, and pgAdmin.

Useful Commands

./mvnw clean verify
  • Runs tests to confirm read/write separation logic.

Observing Logs

  • Check application logs to see whether read queries are routed to the replica.
  • For pgAdmin: http://localhost:5050

Notes

  • Ensure the uuid-ossp extension is installed if your code uses auto-generated UUIDs.
  • If you see issues with replication lag or stuck transactions, verify Postgres configuration and WAL settings.

---

## Updated **boot-data-window-pagination/README.md**

```markdown
# Boot Data Window Pagination

Illustrates keyset (a.k.a. window) pagination using Spring Data JPA to handle large data sets efficiently without offset-based pagination.

## Why Keyset Pagination?

- **Performance**: More efficient than offset pagination for large, frequently updated datasets.  
- **Consistency**: Avoids certain anomalies when new data is inserted or old data is removed between requests.

## Setup & Run

```shell
docker-compose -f docker/docker-compose.yml up -d
./mvnw spring-boot:run -Dspring-boot.run.profiles=local

Check the logs to confirm the database is ready.

Testing

./mvnw clean verify

Includes integration tests demonstrating the pagination approach.

Advanced Usage

  • Testcontainers: For local ephemeral DB testing (TestApplication.java).
  • Sorting: Commonly used on a monotonic column (e.g., an AUTO_INCREMENT ID).

Useful Links


---

## Updated **boot-data-keyset-pagination/README.md**

```markdown
# Boot Data Keyset Pagination with Blaze Persistence

This project extends the concept of keyset pagination with an additional library, Blaze Persistence, providing simpler syntax for complex dynamic queries.

## Highlights

- **Blaze Persistence** integration for constructing dynamic queries.
- **Keyset Pagination** for high-performance retrieval in large datasets.
- **Flexible Filtering** and sorting strategies built in.

## Building & Running

```shell
docker-compose -f docker/docker-compose.yml up -d
./mvnw spring-boot:run -Dspring-boot.run.profiles=local
./mvnw clean verify

for tests.

References


---

## Updated **multidatasource-multitenancy/README.md**

```markdown
# Multi DataSource & MultiTenancy

Demonstrates a scenario where a single Spring Boot application connects to multiple databases and also implements multi-tenant logic (schema-based or DB-based).

## Architecture

```mermaid
flowchart TD
    A([Application]) -->|Get Data| B{Routing Decision}
    B --> |Primary| C[(Oracle)]
    B --> |Secondary| D[(Postgres)]
    C --> |Tenant Id| E[Discriminator-based MultiTenancy]
    D --> |Schema-based| F[Separate schema or DB per tenant]
    E --> G(((END)))
    F --> G

Setup

docker-compose -f docker/docker-compose.yml up -d
./mvnw spring-boot:run -Dspring-boot.run.profiles=local

Testing

./mvnw clean verify

How It Works

  1. Multiple DataSources: Oracle for certain domain objects, Postgres for others.
  2. MultiTenancy: Switches which schema or DB to use based on an incoming tenant identifier.
  3. TenantInterceptor: Captures request-scope tenant info and sets it in the TenantIdentifierResolver.

Useful Links


---

## Updated **boot-jooq-r2dbc-sample/README.md**

```markdown
# Spring Boot jOOQ R2DBC Sample

Demonstrates reactive SQL operations using [jOOQ](https://www.jooq.org/) and the [R2DBC](https://r2dbc.io/) connection standard in a Spring Boot app.

## Features

1. **Non-Blocking I/O**: Uses reactive driver for asynchronous query handling.
2. **jOOQ Code Generation**: Strongly typed DSL for building queries at compile time.
3. **Native Integration** with Spring Boot dev tools (liquibase/flyway optional).

## Build & Test

```shell
./mvnw clean verify

Run Locally

docker-compose -f docker/docker-compose.yml up -d
./mvnw spring-boot:run -Dspring-boot.run.profiles=local

Observability

  • Swagger UI: http://localhost:8080/swagger-ui.html
  • Actuator: http://localhost:8080/actuator
  • If you need logs or advanced performance checks, consider hooking up Prometheus + Grafana.

---

## Updated **boot-data-envers/README.md**

```markdown
# Spring Data Envers

Extends Spring Data JPA with [Hibernate Envers](https://docs.jboss.org/hibernate/orm/current/userguide/html_single/Hibernate_User_Guide.html#envers) to audit all changes to your entities automatically.

## Why Use Envers?

- **Compliance & Audit**: Track who changed what and when.  
- **Version History**: Revert or compare entity versions over time.

## Build & Run

```shell
./mvnw clean verify
docker-compose -f docker/docker-compose.yml up -d
./mvnw spring-boot:run -Dspring-boot.run.profiles=local

Observability Tools

Additional Notes

  • By default, Envers creates dedicated audit tables with _AUD suffix.
  • If you need custom revision listeners, see the RevisionListener interface.

---

## Updated **boot-data-customsequence/README.md**

```markdown
# Custom Sequence Generation & LazyConnectionDataSourceProxy

This sample demonstrates:
1. **Custom Sequence Generators**: e.g., generating IDs like `ORD000001`.
2. **Lazy Connection**: Using `LazyConnectionDataSourceProxy` to optimize DB connections.
3. **SQL Observability**: Logging queries with `DataSourceProxy` and validating them in integration tests.

## Quick Setup

```shell
docker-compose -f docker/docker-compose.yml up -d
./mvnw clean verify
./mvnw spring-boot:run -Dspring-boot.run.profiles=local

Highlights

  • ValidationGroups: Showcases dynamic validation based on groups.
  • SQL Logging: Observing execution counts to ensure minimal queries in your application flow.
  • Integration Testing: Tools like SQLStatementCountValidator can catch query inflation.

References


---

## Updated **boot-hibernate2ndlevelcache-sample/README.md**

```markdown
# Hibernate 2nd Level Cache with Redis

Leverages Redis to cache frequently accessed entities and associations for faster read performance, reducing round-trips to the database.

## Setup & Run

```shell
docker-compose -f docker/docker-compose.yml up -d
./mvnw clean verify
./mvnw spring-boot:run -Dspring-boot.run.profiles=local

Key Pointers

  • Cache Invalidation: Ensure entity updates invalidate the relevant cache entries.
  • Collection Caching: Hibernate caches collection IDs, meaning each associated entity should also be in the second-level cache.
  • Performance Gains: Gains are scenario-dependent. Profile carefully in production.

---

## Updated **boot-scheduler-jobrunr/README.md**

```markdown
# Boot Scheduler with JobRunr

Implements asynchronous background job scheduling using [JobRunr](https://www.jobrunr.io/en/) in a Spring Boot environment.

## Features

1. **Distributed Job Execution**: Scalability across multiple nodes.
2. **JobRunr Dashboard**: Real-time visibility into job statuses, logs, and scheduling.
3. **Native Build** (Optional): Create a GraalVM-based native executable for faster startup.

## Build & Run

```shell
docker-compose -f docker/docker-compose.yml up -d
./mvnw clean verify
./mvnw spring-boot:run -Dspring-boot.run.profiles=local

Additional Tools

  • Prometheus: http://localhost:9090/
  • Grafana: http://localhost:3000/ (admin/admin)
  • Kibana: http://localhost:5601/
  • JobRunr Dashboard: http://localhost:8000/dashboard/overview

References


---

## Updated **boot-r2dbc-sample/README.md**

```markdown
# Reactive Application with R2DBC

Shows how to build reactive CRUD operations in Spring Boot using the R2DBC specification for non-blocking database connectivity.

## Why R2DBC?

- **Non-Blocking I/O**: Great for high-throughput applications needing concurrency.
- **Built for Reactive Streams**: Perfectly aligns with Spring WebFlux.

## Build & Run

```shell
docker-compose -f docker/docker-compose.yml up -d
./mvnw clean verify
./mvnw spring-boot:run -Dspring-boot.run.profiles=local

Dev-Time with Testcontainers

./mvnw spring-boot:test-run

Runs integration tests with ephemeral containers.

Links


---

## Updated **boot-togglz-sample/README.md**

```markdown
# Feature Toggles With Togglz

Demonstrates using the [Togglz](https://www.togglz.org/) library for feature toggling in a Spring Boot application, enabling features to be turned on/off without redeploys.

## Key Features

- **Multiple Strategies**: e.g., date-based, user-based, or percentage-based toggles.
- **Togglz Console**: Manage toggles at runtime with a UI.
- **Integration with Spring Boot**: Simple property-based configuration.

## Running Locally

```shell
docker-compose -f docker/docker-compose.yml up -d
./mvnw spring-boot:run -Dspring-boot.run.profiles=local

Observability


---

## Updated **boot-ultimate-redis/README.md**

```markdown
# Ultimate Redis Implementation

A comprehensive sample showcasing various Redis usage patterns, including sentinel architecture, advanced TTL management, and cluster connections.

## Redis Sentinel & High Availability

- Runs 1 master, 1 replica, and 3 sentinel instances via Docker Compose.  
- **Quorum** Setting (defaults to 2) for failover decisions.

## ReadFrom Settings

- Configurable with Lettuce: e.g., MASTER, REPLICA_PREFERRED, etc.

## Commands

```shell
# Access CLI
docker exec -it redis-server redis-cli
keys *

Running & Testing

docker-compose -f docker/docker-compose.yml up -d
./mvnw clean verify
./mvnw spring-boot:run -Dspring-boot.run.profiles=local

References


---

## Updated **boot-scheduler-shedlock/README.md**

```markdown
# Boot Scheduler with ShedLock

Ensures only one instance of a scheduled job runs in a clustered environment, preventing overlapping tasks across multiple nodes.

## Main Benefits

1. **Fail-safe**: If one node fails mid-job, another node can acquire the lock after lease expiry.
2. **Database Agnostic**: Works with multiple DB types.

## Quick Start

```shell
docker-compose -f docker/docker-compose.yml up -d
./mvnw clean verify
./mvnw spring-boot:run -Dspring-boot.run.profiles=local

Check logs or your DB table to see the distributed locks in action.

References


---

## Updated **graphql/boot-graphql-querydsl/README.md**

```markdown
# GraphQL with QueryDSL

Combines GraphQL’s flexible schema definition and QueryDSL’s type-safe query generation in a Spring Boot environment.

## Why Use QueryDSL with GraphQL?

- **Rich Filtering**: Type-safe queries that can evolve with your schema.
- **Reduced Boilerplate**: QueryDSL auto-generates domain-based classes.

## Getting Started

```shell
docker-compose -f docker/docker-compose.yml up -d
./mvnw spring-boot:run -Dspring-boot.run.profiles=local

Check:

  • GraphQL endpoint: http://localhost:8080/graphql
  • Swagger UI: http://localhost:8080/swagger-ui.html

Testing

./mvnw clean verify

Additional Info


---

## Updated **graphql/boot-graphql-webflux/README.md**

```markdown
# GraphQL with WebFlux

Implements a reactive GraphQL server using Spring WebFlux, enabling highly scalable endpoint queries.

## Key Points

- **Reactive Execution**: Non-blocking data fetchers.
- **Scalable**: Ideal for high-concurrency scenarios.

## Build & Run

```shell
docker-compose -f docker/docker-compose.yml up -d
./mvnw clean verify
./mvnw spring-boot:run -Dspring-boot.run.profiles=local

Usage

  • GraphQL Endpoint: http://localhost:8080/graphql
  • Swagger UI: http://localhost:8080/swagger-ui.html

---

## Updated **graphql/boot-graphql-webmvc/README.md**

```markdown
# GraphQL with Spring MVC

Demonstrates a blocking GraphQL approach via Spring MVC for synchronous data fetching.

## Setup

```shell
docker-compose -f docker/docker-compose.yml up -d
./mvnw spring-boot:run -Dspring-boot.run.profiles=local

Useful Links

Notes

  • Great for simpler, synchronous workloads or existing MVC-based infrastructures.
  • For advanced concurrency, consider WebFlux variant.

---

## Updated **boot-togglz-sample/README.md** was already covered, so skipping duplicates.

---

## Updated **boot-web-client-webflux/README.md**

```markdown
# Boot WebClient WebFlux

Demonstrates calling external HTTP APIs using Spring 5’s `WebClient` in a fully reactive Spring WebFlux application.

## Why WebClient?

- **Non-Blocking I/O**: More efficient concurrency for external service calls.
- **Fluent API**: Composable approach to building HTTP requests.

## Getting Started

```shell
docker-compose -f docker/docker-compose.yml up -d
./mvnw clean verify
./mvnw spring-boot:run -Dspring-boot.run.profiles=local

Key Files

  • WebClientConfig.java: Central location for WebClient bean configuration.
  • Application.java: Bootstraps WebFlux + custom routers.
  • ExampleController.java: Sample usage of WebClient to fetch data from an external service.

Observing Results

  • Logs: Watch for request/response details.
  • Tour the Actuator endpoints at http://localhost:8080/actuator.

---

## Updated **boot-restclient/README.md** (if it exists)

```markdown
# Spring 6 RestClient

Introduces the new RestClient in Spring 6.2 as an alternative to WebClient or RestTemplate for synchronous and reactive usage (depending on the environment).

## Why RestClient?

- **Unified API**: Replaces older RestTemplate approach, offering a modern, extensible framework.
- **Reactive Support**: Leverage reactive backends if desired.

## Running

```shell
docker-compose -f docker/docker-compose.yml up -d
./mvnw clean verify
./mvnw spring-boot:run -Dspring-boot.run.profiles=local

Example Usage

Check out MyService.java for a sample usage of RestClient.create().


Helpful Links


---

## Updated **boot-rabbitmq-thymeleaf/README.md**

```markdown
# Spring Boot with RabbitMQ & Thymeleaf

Demonstrates a message producer and consumer setup with RabbitMQ, plus a simple Thymeleaf UI for administrative or demonstration purposes.

## Key Features

- **Producer Confirmations & DLQ**: Ensures reliable delivery with Dead Letter Queues.
- **Thymeleaf UI**: A minimal interface to view or publish messages.
- **Spring AMQP**: Streams events, allowing asynchronous processing.

## Usage

```shell
docker-compose -f docker/docker-compose.yml up -d
./mvnw clean verify
./mvnw spring-boot:run -Dspring-boot.run.profiles=local

Notes

  • Make sure you have Docker allocated enough memory for RabbitMQ if you test high throughput scenarios.
  • For advanced routing or exchange setup, refer to application.yml or dedicated config classes.

---

## Final Note

This completes the sample updated README files for each sub-project. You can copy these updates into their respective `README.md` files to enrich documentation, clarify usage, and share deeper context. Feel free to modify or expand based on your personal preferences or organizational standards.

---



<details>
<summary>🔗 Analysis chain</summary>



</details>

<details>
<summary>🏁 Scripts executed</summary>

The following scripts were executed for the analysis:

Script:

#!/bin/bash

Let's find and display the content of all files named readme.md (case-insensitive) across the entire repository.

Once we retrieve the contents, we will propose updated documentation for each file.

fd -i "readme.md" --exec cat {} ;


Length of output: 67273

</details>

<details>
<summary>:white_check_mark: Actions performed</summary>

Comments resolved.

</details>

@rajadilipkolli rajadilipkolli merged commit 7a94a26 into main Dec 26, 2024
12 of 13 checks passed
@rajadilipkolli rajadilipkolli deleted the doc-polish branch December 26, 2024 12:02
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.

1 participant