Tech Rocks

Coldfusion
Java
JQuery

An online resource for latest web technologies like Coldfusion, JRun, Pro*C, JQuery, HTML5, PHP, W3C, Java, J2EE, C, C++, ORACLE, PL/SQL, MySql, Ajax, Coldbox, Fusebox, UNIX, JavaScript, NodeJS and much more... contact@tech-rocks.org

Tuesday, October 22, 2013

Spring JSR-250 Annotations

Spring has JSR-250 based annotations which include @PostConstruct, @PreDestroy and @Resource annotations.

  • @PostConstruct: This annotation can be used as an alternate of initialization callback.

  • @PreDestroy: This annotation can be used as an alternate of destruction callback.

  • @Resource : This annotation can be used on fields or setter methods. The @Resource annotation takes a 'name' attribute which will be interpreted as the bean name to be injected. You can say, it follows by-name autowiring semantics.

0 comments :