Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Spring MVC Annotated Controller Interface
- @Controller
- @RequestMapping("/services/goal/")
- public interface GoalService {
- @RequestMapping("options/")
- @ResponseBody
- Map<String, Long> getGoals();
- @RequestMapping(value = "{id}/", method = RequestMethod.DELETE)
- @ResponseBody
- void removeGoal(@PathVariable String id);
- }
- @Component
- public class GoalServiceImpl implements GoalService {
- /* init code */
- public Map<String, Long> getGoals() {
- /* method code */
- return map;
- }
- public void removeGoal(String id) {
- Goal goal = goalDao.findByPrimaryKey(Long.parseLong(id));
- goalDao.remove(goal);
- }
- }
- ExceptionHandlerExceptionResolver - Resolving exception from handler [public void
- todo.webapp.controllers.services.GoalServiceImpl.removeGoal(java.lang.String)]:
- org.springframework.web.bind.MissingServletRequestParameterException: Required
- String parameter 'id' is not present
Add Comment
Please, Sign In to add comment