4
私は春の3Springの@Valueアノテーションに相当するJSR-330はありますか?
とJSR-330のアノテーションを使用しようとしているが、プロパティ値を挿入するためのSpringの@Value
注釈のJSR-330と同等はありますか?例えば私は@Provider
を使用して、Springにプロパティ値を注入するように指示できますか?
私は春の3Springの@Valueアノテーションに相当するJSR-330はありますか?
とJSR-330のアノテーションを使用しようとしているが、プロパティ値を挿入するためのSpringの@Value
注釈のJSR-330と同等はありますか?例えば私は@Provider
を使用して、Springにプロパティ値を注入するように指示できますか?
org.springframework.beans-3.0.5.RELEASE.jar
を使用しているプロジェクトで@Value
の用途を探しました。アノテーションは、AutowiredAnnotationBeanPostProcessor
とQualifierAnnotationAutowireCandidateResolver
の2か所で参照されています。
AutowiredAnnotationBeanPostProcessor
に記載されている唯一のJSR-330注釈はjavax.inject.Inject
です。
public AutowiredAnnotationBeanPostProcessor()
{
this.autowiredAnnotationTypes.add(Autowired.class);
this.autowiredAnnotationTypes.add(Value.class);
ClassLoader cl = AutowiredAnnotationBeanPostProcessor.class.getClassLoader();
try {
this.autowiredAnnotationTypes.add(cl.loadClass("javax.inject.Inject"));
this.logger.info("JSR-330 'javax.inject.Inject' annotation found and supported for autowiring");
}
catch (ClassNotFoundException localClassNotFoundException)
{
}
}
QualifierAnnotationAutowireCandidateResolver
は、JSR-330のアノテーションには言及していません。