Skip to content

Commit

Permalink
Revert "Improve rule"
Browse files Browse the repository at this point in the history
This reverts commit d80ef44.

Signed-off-by: Juan Manuel Leflet Estrada <jleflete@redhat.com>
  • Loading branch information
jmle committed Nov 25, 2024
1 parent b199ad0 commit 6c4c4fa
Showing 1 changed file with 2 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,24 +71,11 @@
from: annotation
description: "@RequestMapping does not detect controllers anymore"
message: |
Spring MVC and Spring WebFlux no longer detect controllers based solely on a type-level `@RequestMapping`
Spring MVC and Spring WebFlux no longer detect controllers based solely on a type-level @RequestMapping
annotation. That means interface-based AOP proxying for web controllers may no longer work. Please, enable
class-based proxying for such controllers; otherwise the interface must also be annotated with `@Controller`.
To enable class-based proxying, add the `@EnableAspectJAutoProxy(proxyTargetClass = true)` annotation to your
configuration-annotated class:
```
@Configuration
@EnableAspectJAutoProxy(proxyTargetClass = true)
public class AppConfig {
// Bean configurations
}
```
class-based proxying for such controllers; otherwise the interface must also be annotated with @Controller.
links:
- title: 'Spring 6.0 migration guide'
url: https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-6.0-Release-Notes#web-applications
- title: 'EnableAspectJAutoProxy javadocs'
url: https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/context/annotation/EnableAspectJAutoProxy.html


0 comments on commit 6c4c4fa

Please sign in to comment.