Created
January 23, 2017 17:00
-
-
Save darbyluv2code/d4b21395ad6ecaed6dbf9f74ca230b8b to your computer and use it in GitHub Desktop.
Spring MVC Demo - Read country options from properties file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <beans xmlns="http://www.springframework.org/schema/beans" | |
| xmlns:context="http://www.springframework.org/schema/context" | |
| xmlns:mvc="http://www.springframework.org/schema/mvc" | |
| xmlns:util="http://www.springframework.org/schema/util" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| 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 | |
| http://www.springframework.org/schema/util | |
| http://www.springframework.org/schema/util/spring-util.xsd"> | |
| <!-- Step 3: Add support for component scanning --> | |
| <context:component-scan base-package="com.luv2code.springdemo" /> | |
| <!-- Step 4: Add support for conversion, formatting and validation support --> | |
| <mvc:annotation-driven/> | |
| <!-- Step 5: Define Spring MVC view resolver --> | |
| <bean | |
| class="org.springframework.web.servlet.view.InternalResourceViewResolver"> | |
| <property name="prefix" value="/WEB-INF/view/" /> | |
| <property name="suffix" value=".jsp" /> | |
| </bean> | |
| <util:properties id="countryOptions" location="classpath:../countries.properties" /> | |
| </beans> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment