I have a view class that extends AbstractExcelView
public class ExportExcelParticipantsView extends AbstractExcelView {
...
}
I would like to introduce a MessageSource into this bean. Is it possible?
I am using ResourceBundleViewResolver to allow views (in this case)
<bean id="resourceBundleViewResolver"
class="org.springframework.web.servlet.view.ResourceBundleViewResolver">
<property name="basename" value="views" />
<property name="order" value="0"/>
<property name="defaultParentView" value="parent-view"/>
</bean>
Is it really so that this presentation class is created every time a view is requested, and thus entering a message source into this class is more complicated than usual? Is it possible?
I am currently passing MessageSource as an attribute of the model from the controller to the view. Can this be avoided?
source
share