Please Enable JavaScript!
Gon[ Enable JavaScript ]

spring 에서 Velocity framework 사용을 위한 설정

자바(JAVA)
반응형

Application.xml

<!-- Velocity
대한 설정 -->

<bean id="velocityConfig" class="org.springframework.web.servlet.view.velocity.VelocityConfigurer">

       <property name="resourceLoaderPath">

             <value>/WEB-INF/vm/</value>

       </property>

       <property name="velocityProperties">

           <props>

               <prop key="input.encoding">euc-kr</prop>

               <prop key="output.encoding">euc-kr</prop>
              
<prop key="file.resource.loader.cache">false</prop>

           </props>

       </property>

</bean>

      

<bean id="viewResolver"   class="org.springframework.web.servlet.view.velocity.VelocityViewResolver">

       <property name="exposeRequestAttributes" value="true" />

       <property name="exposeSessionAttributes" value="true" />

       <property name="exposeSpringMacroHelpers" value="true" />

       <property name="requestContextAttribute" value="rc" />

       <property name="cache" value="false" />

       <property name="suffix" value=".vm" />

       <property name="contentType">

             <value>text/html; charset=euc-kr</value>

       </property>

       <property name="toolboxConfigLocation" value="/WEB-INF/toolbox.xml" />

</bean>


반응형
Posted by 녹두장군1
,