Use protected for members in generated service classes - #33919
Open
DhairyasheelS wants to merge 3 commits into
Open
Use protected for members in generated service classes#33919DhairyasheelS wants to merge 3 commits into
DhairyasheelS wants to merge 3 commits into
Conversation
Generated service classes are meant to be extended (e.g. ExtendedFooService extends FooService), but private fields and helper methods prevent clean subclassing. Switch them to protected so the generated services follow the open/closed principle. Scope is limited to service classes: - inject_template injected fields become protected, gated by the existing isController flag so REST controllers stay private (they use a parallel @RestController extension pattern, not inheritance) - UserService fields and helper methods become protected - updateIfPresent in the entity service implementation becomes protected Class-level constants (private static final Logger) are left untouched. Closes jhipster#33715
Author
|
Hi !! @vw98075 can you trigger CI/CD please? i want to verify all tests |
…ontainers The Couchbase Testcontainer reports "started" once its management API is up, but the KV service can still be warming up on loaded CI runners. Couchmove's first lock-document read then hits an UnambiguousTimeoutException (BUCKET_NOT_AVAILABLE), which fails the couchmove bean and takes down the whole Spring context on the first test, cascading into "ApplicationContext failure threshold exceeded" errors on every other test in the class (reproduced locally: Tests run 28, Errors 3 on the ms-vue-eureka-jwt-couchbase-hazelcast gateway sample). Add a retry-with-backoff around couchmove.migrate(), a longer container startup timeout, and looser kv_timeout/connect_timeout on the Couchbase connection string to cover the warm-up gap.
…to-configured ClusterEnvironment
Spring Boot's Couchbase auto-configuration always builds a
ClusterEnvironment from spring.couchbase.env.* properties, and the SDK
throws IllegalArgumentException ("Can't use a pre-built ClusterEnvironment
with a connection string that has parameters") if the connection string
also carries query params. Set the connect/key-value timeouts via
spring.couchbase.env.timeouts.* dynamic properties instead.
Verified locally: gateway ci:backend:test on ms-vue-eureka-jwt-couchbase-hazelcast
now passes (Tests run: 124, Failures: 0, Errors: 0), where it previously
failed with "ApplicationContext failure threshold exceeded".
Author
|
Hi !! @vw98075 can you trigger CI/CD please? i want to verify all tests |
Author
|
Hi @vw98075 @DanielFran !! CI is now fully green , no merge conflicts — let me know if anything else is needed for review. |
Author
|
Hi @DanielFran @vw98075 !! CI is now fully green , no merge conflicts — let me know if anything else is needed for review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Generated service classes are meant to be extended (e.g. ExtendedFooService extends FooService), but private fields and helper methods prevent clean subclassing. Switch them to protected so the generated services follow the open/closed principle.
Scope is limited to service classes:
Class-level constants (private static final Logger) are left untouched.
Closes #33715
Please make sure the below checklist is followed for Pull Requests.
Co-authored-by:trailer in the commit(s)When you are still working on the PR, consider converting it to Draft (below reviewers) and adding
skip-cilabel, you can still see CI build result at your branch.