-
-
Save darbyluv2code/9a09543a226baeedc04b9a5037ca52ec to your computer and use it in GitHub Desktop.
Spring MVC - Reading CSS, JavaScript and Images
This file contains 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
body { | |
background-color: lightblue; | |
} | |
h2 { | |
color: white; | |
text-align: center; | |
} | |
p { | |
font-family: verdana; | |
font-size: 20px; | |
} |
This file contains 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
function doSomeWork() { | |
alert("I'm doing some work!!!"); | |
} |
This file contains 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: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"> | |
<!-- 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> | |
<mvc:resources mapping="/resources/**" location="/resources/" /> | |
</beans> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Chad! 20% through the course, and I want to thank you already. My concept around Spring were never so clear. Thank you again.