自定义标签怎么进行spring的@Autowired

自定义标签如何进行spring的@Autowired自定义了一个tag,里面需要引用到service层,利用@Autowired注解,永远

自定义标签如何进行spring的@Autowired
自定义了一个tag,里面需要引用到service层,利用@Autowired注解,永远得不到service对象,这是为什么呢

public class CataTag extends BodyTagSupport {
/**
 * 
 */
private static final long serialVersionUID = 1L;

@Autowired
public HSListViewComponent sysCataViewComponent;

[解决办法]
spring 配置文件 applicationContext.xml 里加入
<bean class="org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor"/>  
了没,Spring 通过一个 BeanPostProcessor 对 @Autowired 进行解析,所以要让 @Autowired 起作用必须事先在 Spring 容器中声明 AutowiredAnnotationBeanPostProcessor Bean。
[解决办法]
因为它没被Spring托管  所以写注解白写