Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to map all requests to single controller method in spring?

I am new to spring. I want to map all the requests to single controller method. That's why I have specified following requestmapping

@RequestMapping
(
  value="/PnPanel.go/CData/**", 
  method={RequestMethod.GET, RequestMethod.POST}
)

But still it's giving 404 error, when URL is requested

http://localhost:8088/PnPanel.go/CData/invokeCDScreen

Don't know, what I am missing here. I tried searching on net, but all the solutions didn't work for me.

Thanks in advance.

like image 706
Mangu Singh Rajpurohit Avatar asked Nov 22 '25 13:11

Mangu Singh Rajpurohit


1 Answers

Actually, I had solved it myself. I was missing the following thing :-

@RequestMapping
(
  value="/PnPanel.go/CData/*", 
  method={RequestMethod.GET, RequestMethod.POST}
)

Thus, instead of using two asterisks, only one was required.

like image 173
Mangu Singh Rajpurohit Avatar answered Nov 24 '25 01:11

Mangu Singh Rajpurohit