0% found this document useful (0 votes)
24 views

Webconfig Basics

The document defines a Spring configuration file that configures component scanning, annotation-driven MVC, and view resolution for JSP files under the /WEB-INF/views directory.

Uploaded by

Luis Angel Mares
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Webconfig Basics

The document defines a Spring configuration file that configures component scanning, annotation-driven MVC, and view resolution for JSP files under the /WEB-INF/views directory.

Uploaded by

Luis Angel Mares
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

<?xml version="1.0" encoding="UTF-8"?

>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd">

<context:component-scan base-package="com.angel.controller" />


<mvc:annotation-driven />
<bean id="viewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix">
<value>/WEB-INF/views/</value>
</property>
<property name="suffix">
<value>.jsp</value>
</property>
</bean>

<!-- Agregamos una ruta para recursos estaticos -->


<mvc:resources location="/resources/" mapping="/resources/**"/>
<mvc:resources location="/" mapping="/urlRoot/**"/>

</beans>

You might also like