Skip to content

Rework configuration of scheduled tasks to avoid @Bean method invocations #1516

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

Closed
vpavic opened this issue Sep 27, 2019 · 0 comments
Closed
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@vpavic
Copy link
Contributor

vpavic commented Sep 27, 2019

Turns out we have the following that were missed in #1345 and #1362:

@Override
public void configureTasks(ScheduledTaskRegistrar taskRegistrar) {
taskRegistrar.addCronTask(() -> sessionRepository().cleanupExpiredSessions(), this.cleanupCron);
}

@Override
public void configureTasks(ScheduledTaskRegistrar taskRegistrar) {
taskRegistrar.addCronTask(() -> sessionRepository().cleanUpExpiredSessions(), this.cleanupCron);
}

@vpavic vpavic added the type: enhancement A general enhancement label Sep 27, 2019
@vpavic vpavic added this to the 2.2.0.RC1 milestone Sep 27, 2019
@vpavic vpavic self-assigned this Sep 27, 2019
vpavic added a commit to vpavic/spring-session that referenced this issue Sep 30, 2019
This commit sets proxyBeanMethods to false on all @enable*Session annotations since they are meta-annotated with @configuration.

See: spring-projects#1516
vpavic added a commit to vpavic/spring-session that referenced this issue Sep 30, 2019
This commit extracts scheduling configurers that are used in Redis and JDBC configurations into nested configuration classes in order to avoid bean method references.

Resolves: spring-projects#1516
vpavic added a commit that referenced this issue Sep 30, 2019
This commit sets proxyBeanMethods to false on all @enable*Session annotations since they are meta-annotated with @configuration.

See: #1516
@vpavic vpavic closed this as completed in c88456a Sep 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant