[
https://issues.apache.org/jira/browse/WW-3972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13564081#comment-13564081
]
Lukasz Lenart commented on WW-3972:
-----------------------------------
"By default, Spring will not aware of the @PostConstruct and @PreDestroy
annotation. To enable it, you have to either register
‘CommonAnnotationBeanPostProcessor‘ or specify the ‘<context:annotation-config
/>‘ in bean configuration file"
If don't want to use DI specific functionality, maybe Preparable interface is
what you need:
- http://struts.apache.org/2.x/docs/preparable-interface.html
-
http://stackoverflow.com/questions/9273979/why-we-need-preparable-interface-in-struts2
-
http://struts.apache.org/2.x/xwork-core/apidocs/com/opensymphony/xwork2/Preparable.html
> Action Class Post Construct Method
> ----------------------------------
>
> Key: WW-3972
> URL: https://issues.apache.org/jira/browse/WW-3972
> Project: Struts 2
> Issue Type: New Feature
> Components: Plugin - Spring
> Reporter: nick
> Priority: Minor
> Fix For: 3.x
>
>
> It would be better, if struts2 can take advantage of post constructor method
> call in Action classes. There are cases like loading various resources, etc
> immediately after struts Action class initialized. In fact, it's like every
> action can have an optional post constructor method where we can do all other
> common chores.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira