Java依赖规范@Inject使用有什么条件

可能表达不是很清楚,现在新建了一个dynamic web project项目,然
后新建了一个SpringMVC的配置文件,在配置文件中加上mvc:annotation-driven/
就可以用@Controller等等,现在想用@Inject需要在哪个配置文件中加上,另外地还需要导入包或者其他的操作吗

@Inject使用方法参考:http://www.oschina.net/translate/java-ee-cdi-dependency-injection-inject-tutorial

会自动注册DefaultAnnotationHandlerMapping与AnnotationMethodHandlerAdapter 两个bean,是spring MVC为@Controllers分发请求所必须的。如果你想使用注解的话 必须在配置文件中添加context:annotation-config/