<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/applicationContext*.xml,/WEB-INF/security.xml
</param-value>
</context-param>
lunes, 12 de noviembre de 2007
Several applicationContext, split applicationContext
Para dividir el appCtx.xml en varios files:
viernes, 9 de noviembre de 2007
Access the BeanFactory through ServletContext
Para acceder a la beanFactory dentro de alguna clase se registra el ContextListener en el web xml (generalmente ya está registrado para struts2):
En el código se accede a la factory:
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
En el código se accede a la factory:
WebApplicationContextUtils.getWebApplicationContext(servletContext);
jueves, 1 de noviembre de 2007
SQLServer express spring datasource config
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
<property name="url" value="jdbc:sqlserver://localhost\SQLEXPRESS;databaseName=workflow;" />
<property name="username" value="root" />
<property name="password" value="xxxx" />
</bean>
<property name="hibernateProperties">
<props>
<prop key="hibernate.hbm2ddl.auto">none</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.dialect">
org.hibernate.dialect.SQLServerDialect
</prop>
</props>
</property>
</bean>
Suscribirse a:
Entradas (Atom)