Reputation: 133
@RequestMapping(value = "/{Id}", method = RequestMethod.GET)
public String searchCity( @PathVariable ("Id") Long Id) {
mymethod.something(id);
return "successpage";
}
When I'm trying to write some number it print me Eror 404 resource is not available, but when I write {Id} ("7DId7D" smthing like this) it redirects me to succespage, What is the problem? Help me please...
Upvotes: 0
Views: 160
Reputation: 41143
The information you provided conflicts with known behavior of Spring MVC
http://localhost:8080/MyCountryProject/7
should maps to searchCity finehttp://localhost:8080/MyCountryProject/%7Bld%7D
should not even map to searchCityI would check following to further isolate the problem:
@RequestMapping("myController")
then your URL would be http://localhost:8080/MyCountryProject/MyController/7
Upvotes: 2