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");

有帮助吗?

解决方案

Maybe I misunderstood, but this mapping

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

will catch every path starting with /view.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top