Skip to content

proxy-target-class=true not in effect #16398

@toby1024

Description

@toby1024

English is not my first language, please email [email protected] if not understand my description.

environment:
springboot: 2.1.3.RELEASE

describe:
I use @Transactional(rollbackFor = Exception.class) in my service method, and config

spring:
  aop:
    auto: true
    proxy-target-class: true

but, spring still report

TransactionAutoConfiguration.EnableTransactionManagementConfiguration.CglibAutoProxyConfiguration matched:
      - @ConditionalOnProperty (spring.aop.proxy-target-class=true) matched (OnPropertyCondition)
 AopAutoConfiguration.JdkDynamicAutoProxyConfiguration:
      Did not match:
         - @ConditionalOnProperty (spring.aop.proxy-target-class=false) found different value in property 'proxy-target-class' (OnPropertyCondition)

and suggest me

Action:
Consider injecting the bean as one of its interfaces or forcing the use of CGLib-based proxies by setting proxyTargetClass=true on @EnableAsync and/or @EnableCaching.

if I remove the annotation,success.
why?

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: invalidAn issue that we don't feel is valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions