Skip to content

Regression: prototype @ControllerAdvice beans should not be cached#24157

Closed
yokotaso wants to merge 1 commit into
spring-projects:masterfrom
yokotaso:master
Closed

Regression: prototype @ControllerAdvice beans should not be cached#24157
yokotaso wants to merge 1 commit into
spring-projects:masterfrom
yokotaso:master

Conversation

@yokotaso

@yokotaso yokotaso commented Dec 7, 2019

Copy link
Copy Markdown
Contributor

It is ignored that the scope of bean, which is annotated @ControllerAdvice .

Broken at this commit.
21267e5

Bean of ControllerAdvice is wrongly cached, I think.
If Scope of Bean which is annotated @ControllerAdvice and
register as a not singleton component, ControllerAdviceBean#resolveBean() should
request to BeanFactory.

@yokotaso yokotaso changed the title Bean scope of @Controller Advice is ignored. Bean scope of @ControllerAdvice is ignored. Dec 7, 2019
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Dec 7, 2019
@sbrannen sbrannen self-assigned this Dec 7, 2019
@sbrannen sbrannen added the in: web Issues in web modules (web, webmvc, webflux, websocket) label Dec 7, 2019
@sbrannen

sbrannen commented Dec 7, 2019

Copy link
Copy Markdown
Member

Good catch! Thanks for submitting the PR.

@sbrannen sbrannen added type: regression A bug that is also a regression and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Dec 7, 2019
@sbrannen sbrannen added this to the 5.2.3 milestone Dec 7, 2019
@sbrannen sbrannen changed the title Bean scope of @ControllerAdvice is ignored. Regression: prototype @ControllerAdvice should not be cached Dec 7, 2019
@sbrannen sbrannen changed the title Regression: prototype @ControllerAdvice should not be cached Regression: prototype @ControllerAdvice beans should not be cached Dec 7, 2019
@sbrannen sbrannen closed this in d7d474f Dec 7, 2019
sbrannen added a commit that referenced this pull request Dec 7, 2019
@sbrannen

sbrannen commented Dec 7, 2019

Copy link
Copy Markdown
Member

This has been merged into master in d7d474f and refined in fc42ca2.

Thanks

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

Labels

in: web Issues in web modules (web, webmvc, webflux, websocket) type: regression A bug that is also a regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants