Skip to content

chore: remove redundant @Repository annotations and upgrade Spring Boot to 4.1.0 - #6930

Open
Ludy87 wants to merge 19 commits into
mainfrom
springBootVersion_4_1_0_20260709
Open

chore: remove redundant @Repository annotations and upgrade Spring Boot to 4.1.0#6930
Ludy87 wants to merge 19 commits into
mainfrom
springBootVersion_4_1_0_20260709

Conversation

@Ludy87

@Ludy87 Ludy87 commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Description of Changes

This PR removes redundant @Repository annotations from Spring Data JPA repository interfaces and updates several core framework dependencies, primarily upgrading Spring Boot to 4.1.0.

What was changed

  • Upgraded Spring Boot from 4.0.6 to 4.1.0.
  • Updated Spring Security SAML from 7.0.5 to 7.1.0.
  • Updated the dependency-license-report Gradle plugin from 3.1.2 to 3.1.4.
  • Removed unnecessary @Repository annotations and related imports from all Spring Data JPA repository interfaces across the proprietary and saas modules.
  • Updated comments and test assertions to refer to "repository interfaces" instead of "@Repository interfaces".
  • Added forced dependency versions for:
    • org.apache.santuario:xmlsec:4.0.4
    • com.google.guava:guava:${guavaVersion}
  • Added a getEnv() Gradle helper that logs relevant security and build environment variables during the build process.

Why the change was made

  • Spring Data JPA automatically detects repository interfaces extending JpaRepository, making explicit @Repository annotations unnecessary.
  • Upgrading to Spring Boot 4.1.0 and related dependencies keeps the project aligned with the latest framework improvements, bug fixes, and security updates.
  • Explicit dependency resolution helps avoid version conflicts introduced through transitive dependencies.
  • Additional environment logging simplifies troubleshooting of build and CI configuration.

Checklist

General

Documentation

Translations (if applicable)

UI Changes (if applicable)

  • Screenshots or videos demonstrating the UI changes are attached (e.g., as comments or direct attachments in the PR)

Testing (if applicable)

  • I have run task check to verify linters, typechecks, and tests pass
  • I have tested my changes locally. Refer to the Testing Guide for more details.

@dosubot dosubot Bot added the size:M This PR changes 30-99 lines ignoring generated files. label Jul 9, 2026
@stirlingbot stirlingbot Bot added Java Pull requests that update Java code Front End Issues or pull requests related to front-end development Security Security-related issues or pull requests chore Routine tasks or maintenance that don't modify src or test files Gradle Pull requests that update Gradle code labels Jul 9, 2026
@dosubot dosubot Bot added size:L This PR changes 100-499 lines ignoring generated files. and removed size:M This PR changes 30-99 lines ignoring generated files. labels Jul 9, 2026
Comment on lines +25 to +29
+ " p.teamId = :teamId) order by coalesce(p.sortOrder, 0) asc, p.id asc")
List<PolicyEntity> findByTeam(@Param("teamId") Long teamId);

/** All policies in run order — used when team scoping is off (login-disabled). */
@Query("select p from PolicyEntity p order by coalesce(p.sortOrder, 0) asc, p.id asc")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Query logic conflicts with its documented behavior: coalesce(p.sortOrder, 0) makes null and 0 equivalent, so null sortOrder rows are not guaranteed to sort first.

Show fix
Suggested change
+ " p.teamId = :teamId) order by coalesce(p.sortOrder, 0) asc, p.id asc")
List<PolicyEntity> findByTeam(@Param("teamId") Long teamId);
/** All policies in run order — used when team scoping is off (login-disabled). */
@Query("select p from PolicyEntity p order by coalesce(p.sortOrder, 0) asc, p.id asc")
+ " p.teamId = :teamId) order by p.sortOrder nulls first, p.id asc")
List<PolicyEntity> findByTeam(@Param("teamId") Long teamId);
/** All policies in run order — used when team scoping is off (login-disabled). */
@Query("select p from PolicyEntity p order by p.sortOrder nulls first, p.id asc")
Details

✨ AI Reasoning
​The code is trying to define stable run ordering for team policies and documents that policies with no sort value come first. However, the ordering expression converts null to 0 before sorting. That means records with null and records with sortOrder = 0 are treated identically and then ordered only by id, so null-valued rows are not guaranteed to come first. This creates a concrete mismatch between the stated behavior and actual query semantics.

Reply @AikidoSec feedback: [FEEDBACK] to get better review comments in the future.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info

@dosubot dosubot Bot added size:M This PR changes 30-99 lines ignoring generated files. and removed size:L This PR changes 100-499 lines ignoring generated files. labels Jul 9, 2026
@Ludy87
Ludy87 marked this pull request as draft July 9, 2026 17:06
Ludy87 added 3 commits July 9, 2026 19:06
Remove unnecessary @repository annotations and corresponding unused imports from proprietary JPA repository interfaces. Files updated: ResourceGrantRepository, TeamLabelsRepository, ProcessedFileRepository, PolicyRepository, TeamMembershipRepository. No behavioral change — Spring Data auto-detects JpaRepository interfaces; this is a cleanup to remove static noise and unused imports.
@Ludy87
Ludy87 marked this pull request as ready for review July 9, 2026 20:26
Ludy87 added 2 commits July 9, 2026 22:35
Add blank lines between Spring Data imports and domain model imports in three repository classes to improve code organization and readability.
Apply consistent formatting to SaaS repository and configuration classes:
- Reflow JavaDoc comment in SaasJpaConfig for line length
- Add blank lines after import statements in repository interfaces (Google Java Format style)
@stirlingbot stirlingbot Bot removed the has conflicts Pull request has merge conflicts with the base branch label Jul 26, 2026
@Ludy87
Ludy87 marked this pull request as ready for review July 26, 2026 16:33
@stirlingbot stirlingbot Bot added the has conflicts Pull request has merge conflicts with the base branch label Aug 2, 2026
@stirlingbot stirlingbot Bot added has conflicts Pull request has merge conflicts with the base branch and removed has conflicts Pull request has merge conflicts with the base branch labels Aug 2, 2026
@stirlingbot stirlingbot Bot removed the has conflicts Pull request has merge conflicts with the base branch label Aug 6, 2026
@stirlingbot stirlingbot Bot added the has conflicts Pull request has merge conflicts with the base branch label Aug 12, 2026
@Ludy87
Ludy87 requested review from a team as code owners August 12, 2026 22:23
@stirlingbot stirlingbot Bot removed the has conflicts Pull request has merge conflicts with the base branch label Aug 12, 2026
Updates the bundled third-party license metadata to reflect newer dependency versions for Jackson JDK8 and Protobuf, and removes stale entries for renamed or obsolete modules after the dependency refresh.
balazs-szucs
balazs-szucs previously approved these changes Aug 20, 2026
@github-actions github-actions Bot added the has conflicts Pull request has merge conflicts with the base branch label Aug 20, 2026
@Ludy87
Ludy87 requested a review from balazs-szucs August 20, 2026 14:43
@github-actions github-actions Bot removed the has conflicts Pull request has merge conflicts with the base branch label Aug 20, 2026
@github-actions github-actions Bot deleted a comment from stirlingbot Bot Aug 20, 2026
@stirlingbot

stirlingbot Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

✅ Backend License Check Passed

All backend dependencies have valid and allowed licenses.

The backend license report has been updated successfully.

@github-actions

Copy link
Copy Markdown
Contributor

🚀 V2 Auto-Deployment Complete!

🔗 Direct Test URL (non-SSL) http://54.175.155.236:6930

🧩 Admin portal included - try it at http://54.175.155.236:6930/portal.

This deployment will be automatically cleaned up when the PR is closed.

🔄 Auto-deployed for approved V2 contributors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Routine tasks or maintenance that don't modify src or test files Front End Issues or pull requests related to front-end development Gradle Pull requests that update Gradle code Java Pull requests that update Java code Security Security-related issues or pull requests size:M This PR changes 30-99 lines ignoring generated files. Test Testing-related issues or pull requests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants