title: how can I get ExceptionTranslationFilter's BeanDefinition created by <http>
body: <p>everyone:</p>
  
  <p>How can I get <code>ExceptionTranslationFilter</code>'s <code>BeanDefinition</code> created by  in 3.0.x and 3.1.x? I want to reuse its <code>PropertyValue</code> of <code>BeanDefinition</code> (<strong>accessDeniedHandler</strong> and <strong>authenticationEntryPoint</strong>). I found that I cannot get it from <code>DefaultListableBeanFactory</code> by bean name or class, it seems that ExceptionTranslationFilter's BeanDefinition is not registered.</p>
  
  <p>Other filter like <code>UsernamePasswordAuthenticationFilter</code>, it has a bean name :<strong>org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#0</strong>. But <code>ExceptionTranslationFilter</code> doesn't have one.</p>
  
  <p>The only way I found is to search in filterChainProxy's properties iteratively, is there any better way? </p>
  
  <p>what I do in psuedo code:</p>
  
  <pre><code>BeanDefinitionBuilder builder = 
      BeanDefinitionBuilder.rootBeanDefinition(MyExceptionFilter.class);
  RootBeanDefinition exceptionTranslationFilter = getExceptionTranslationFilterBeanDefinition();     
  PropertyValue accessDeniedHandler = exceptionTranslationFilter.getPropertyValues().getPropertyValue("accessDeniedHandler");
  Object handler = (RootBeanDefinition) accessDeniedHandler.getValue();
  builder.addPropertyValue("accessDeniedHandler", handler);
  beanDefinitionRegistry.registerBeanDefinition("myFilter", builder.getBeanDefinition());
  </code></pre>
  
  <p>So, the real problem is <strong>what is the best way to get core filter ExceptionTranslation's accesDeniedHandler <code>BeanDefinition</code></strong></p>