spring - How to use <mvc:resource/> in Groovy -


i want use <mvc:resource/> such <mvc:resources mapping="/images/**" location="/images/" /> <mvc:resources mapping="/resources/**" location="/resources/" /> in context-mvc.groovy,and not know how write.help me~

import org.springframework.web.servlet.view.internalresourceviewresolver  beans {     xmlns context: "http://www.springframework.org/schema/context"       context."component-scan"("base-package" : "com.oberon.fm")      viewresolver(internalresourceviewresolver) {         prefix = "/pages/"         suffix = ".jsp"     } } 

in order use mvc namespace in groovy, need add the xmlns.

then can use context one.

beans {      xmlns([ctx:'http://www.springframework.org/schema/context',            mvc:'http://www.springframework.org/schema/mvc'])      ctx.'component-scan'('base-package': "com.oberon.fm")     mvc.resources(mapping:"/images/**", location:"/images/")     mvc.resources(mapping:"/resources/**", location:"/resources/") } 

Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -