docs(readme): restructure bilingual project guides - #18
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 29247958ae
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| resi-cache: | ||
| redis: | ||
| mode: single # single | cluster | sentinel |
There was a problem hiding this comment.
Configure the Spring Data Redis connection too
When a user follows this new block for a non-default single host, Cluster, or Sentinel deployment, these resi-cache.redis.* properties configure only RedissonConfiguration.buildConfig; actual cache I/O uses the RedisConnectionFactory injected into RedisConnectionConfiguration.redisCacheTemplate, which Boot configures from spring.data.redis.*. As written, the lock client can reach the requested deployment while cache reads and writes still target the default localhost connection. Document the corresponding spring.data.redis settings or explicitly state that both namespaces must be configured.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Addressed in 141816e. The Quick start now configures both spring.data.redis.* for cache I/O and resi-cache.redis.* for Redisson, and the Redis deployment section requires explicitly matching endpoints or topology in both namespaces for single, cluster, and sentinel deployments. See README.md:135-163 and 377-388; the Chinese guide has the equivalent at README.zh-CN.md:126-152 and 348-357.
| ./mvnw -Punit test -B | ||
| ./mvnw install -DskipTests -B |
There was a problem hiding this comment.
Add the installed artifact to the consumer application
For a first-time consumer following this quick start, the commands only install the library into the local Maven repository; the guide then jumps directly to application configuration without ever adding io.github.davidhlp:ResiCache:0.0.2 to the consumer's pom.xml. Consequently the later @RedisCacheable example will not resolve. Restore a dependency snippet after the local install and make clear that the remaining steps run in the consumer project.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Addressed in a310212 and retained in 141816e. Quick start now adds the local consumer dependency io.github.davidhlp:ResiCache:0.0.2 after mvn install and explicitly states that the following configuration and application examples run in the consumer project. See README.md:105-133 and README.zh-CN.md:99-124.
| - `@RedisCaching` for grouping multiple ResiCache operations on one method or | ||
| type. |
There was a problem hiding this comment.
Warn that type-level annotations lose protection policy
When @RedisCaching or another ResiCache annotation is placed only on a type, Spring operation resolution sees the cache operation, but AnnotationParser.addPolicy records protection policy only when the parsed target is a Method; the repository's compatibility contract therefore notes that class-level policy fields are not applied to unannotated methods. Presenting type-level grouping without this boundary can silently leave Bloom, sync-lock, TTL jitter, null caching, and early-expiration settings at their defaults. State that protection attributes must currently be repeated at method level.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Addressed in a310212 and retained in 141816e. Both guides now state that type-level RedisCaching exposes operations but policy fields are evaluated at method level, and that methods must repeat the relevant RedisCacheable, RedisCachePut, or RedisCacheEvict annotation. See README.md:446-450 and README.zh-CN.md:414-417.
| - `SELECTIVE` (default): only converts native annotations when a ResiCache | ||
| annotation is also present, avoiding a dual-advisor path. | ||
| - `FULL`: converts all supported Spring cache annotations. |
There was a problem hiding this comment.
Disclose dual interception in native annotation modes
This description overstates what SELECTIVE prevents: it removes the ResiCache advisor only for methods containing exclusively native annotations. If a method mixes a ResiCache annotation with a different native operation, SpringAnnotationAdapter converts that native operation while Spring's standard cache advisor still handles it, so both advisors execute it; FULL similarly opts every native annotation back into dual interception. Document these mixed/FULL duplicate-operation semantics instead of saying the mode generally avoids the dual-advisor path.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Corrected in 141816e. SELECTIVE is now described as keeping pure-native methods out of the ResiCache conversion path, while distinguishing that internal conversion de-duplication from the separate Spring advisor: explicitly mixed methods can still be handled by both advisors. FULL is also documented as converting plain native-only methods, which can be handled by both advisors when EnableCaching is active; duplicate interception or execution must be intentional and tested. See README.md:283-297 and README.zh-CN.md:261-271.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a310212a6a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| controls its pool, timeout, and retry settings. In single mode, Redisson may | ||
| fall back to Spring Data Redis host, port, database, and password values when | ||
| the corresponding `resi-cache.redis.*` values are unset. Keep the effective |
There was a problem hiding this comment.
Remove the unreachable host and port fallback claim
When an application configures only spring.data.redis.host and port, this promised fallback does not occur: RedisDeploymentProperties initializes the ResiCache host and port to localhost:6379, and RedissonConfiguration.configureSingle prefers those nonblank/nonzero defaults. Fresh evidence after the prior connection-configuration comment is this newly added fallback promise; its host/port branches are reachable only if values are programmatically changed to null/0 (and port 0 violates binding validation). With sync=true, cache I/O can therefore use the configured Spring Redis while Redisson locks the default localhost deployment, so the documentation should require explicit matching endpoints unless the implementation defaults are changed.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Corrected in 141816e. The docs now state that resi-cache.redis.host, port, and database default to localhost, 6379, and 0, so ordinary omission does not inherit spring.data.redis endpoint values. They document only the single-mode password fallback and require explicit matching endpoints or topology in both namespaces for sync=true. See README.md:377-388 and README.zh-CN.md:348-357.
Summary
README.mdandREADME.zh-CN.mdinto a consistent mature-project structure.Validation
bash scripts/ci/check-docs-contracts.shgit diff --check./mvnw clean verify -B— not run; documentation-only change./mvnw checkstyle:check -B— not run; documentation-only changeScope
Documentation only. No Java source, public API, configuration implementation, or test files were changed.