Define custom @Required-style annotation in Spring

来源:互联网 发布:域名历史价格 编辑:程序博客网 时间:2024/05/18 01:27

如果你的code中已经定义了@Required annotation,你可以redefine @Required annotation。

通过:

<bean
class="org.springframework.beans.factory.annotation.RequiredAnnotationBeanPostProcessor">
    <property name="requiredAnnotationType" value="com.mkyong.common.Mandatory"/>
</bean>

http://www.mkyong.com/spring/spring-define-custom-required-style-annotation/

0 0
原创粉丝点击