@RequestMapping's relative path without any leading slash like 'customers' does work.
In web.xml
<servlet-mapping> <servlet-name>dispatcher</servlet-name> <url-pattern>/api/*</url-pattern> <url-pattern>*.htm</url-pattern> </servlet-mapping>
In your java source code
@RequestMapping( "customers" )
Now you can use the URL 'http://myserver.com/api/customers'.
great
ReplyDelete