Pregunta

its easy to intercept any request coming to a specific domain like

http://localhost/stuff

This would be something like

@Controller
@RequestMapping("/view")
public class JsController {

logger.info("Client hit stuff domain);

}

Easy enough

Question: How do you intercept ANYTHING that begins with domain view?

Example

http://localhost/view/someView1

logger.info("Client is within subdomain 'view");

http://localhost/view/someView2

logger.info("Client is within subdomain 'view");

http://localhost/view/js/helper.js

logger.info("Client is within subdomain 'view");

¿Fue útil?

Solución

Maybe I misunderstood, but this mapping

@RequestMapping(value = "/view/**")

will catch every path starting with /view.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top