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

Remove spring-boot-starter-aop dependency from spring-boot-starter-data-jpa and spring-boot-starter-integration #42934

Closed
philwebb opened this issue Oct 30, 2024 · 3 comments
Assignees
Labels
status: noteworthy A noteworthy issue to call out in the release notes type: enhancement A general enhancement
Milestone

Comments

@philwebb
Copy link
Member

Some performance work shows that a simple Spring Data JPA application can have improved startup time if the following exclusions are applied to spring-boot-starter-data-jpa.

<exclusions>
	<exclusion>
		<groupId>org.springframework</groupId>
		<artifactId>spring-aspects</artifactId>
	</exclusion>
	<exclusion>
		<groupId>org.aspectj</groupId>
		<artifactId>aspectjweaver</artifactId>
	</exclusion>
</exclusions>

My non scientific testing shows before:

2024-10-29T21:09:51.630-07:00  INFO 18539 --- [demo] [           main] com.example.demo.DemoApplication         : Started DemoApplication in 2.056 seconds (process running for 2.228)

after:

2024-10-29T21:10:57.554-07:00  INFO 18544 --- [demo] [           main] com.example.demo.DemoApplication         : Started DemoApplication in 1.774 seconds (process running for 1.943)

Perhaps we should change existing starters that pull in spring-boot-starter-aop to instead just pull in spring-aop.

@philwebb philwebb added the for: team-meeting An issue we'd like to discuss as a team to make progress label Oct 30, 2024
@snicoll snicoll added the status: waiting-for-triage An issue we've not yet triaged label Oct 30, 2024
@philwebb philwebb self-assigned this Oct 30, 2024
@philwebb philwebb changed the title Review if spring-aspects is required in spring-boot-starter-aop Remove spring-boot-starter-aop dependency from spring-boot-starter-data Oct 30, 2024
@philwebb
Copy link
Member Author

The dependency to the aot starter was added in commit d06d202. I think we can safely drop it. Users can add it back again if it causes problems.

@philwebb philwebb added type: enhancement A general enhancement status: noteworthy A noteworthy issue to call out in the release notes and removed status: waiting-for-triage An issue we've not yet triaged for: team-meeting An issue we'd like to discuss as a team to make progress labels Oct 30, 2024
@philwebb philwebb added this to the 3.4.x milestone Oct 30, 2024
@philwebb philwebb changed the title Remove spring-boot-starter-aop dependency from spring-boot-starter-data Remove spring-boot-starter-aop dependency from spring-boot-starter-data and spring-boot-starter-integration Oct 30, 2024
@philwebb
Copy link
Member Author

Commit 765bfbd might also be relevant. It looks like spring-aspects was added for the auditing feature.

@philwebb
Copy link
Member Author

Spring Data does give a nice error message so I'm still tempted to remove the dependency.

@philwebb philwebb modified the milestones: 3.4.x, 3.4.0 Oct 31, 2024
@wilkinsona wilkinsona changed the title Remove spring-boot-starter-aop dependency from spring-boot-starter-data and spring-boot-starter-integration Remove spring-boot-starter-aop dependency from spring-boot-starter-data-jpa and spring-boot-starter-integration Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: noteworthy A noteworthy issue to call out in the release notes type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants