I want to setup Rest Controller using Spring without DispatcherServlet.
I have worked with Rest Controller with Spring MVC's dispatcher servlet but I am not sure how to setup controllers without it.
Below is the code that I tried:
@Controller
@RequestMapping("/somemapping")
public class SomeControllerImpl implements SomeController {
@Autowired
private SomeService service;
@Override
@ResponseBody
@RequestMapping(value = "/", method = RequestMethod.GET)
public List<DO> getAllDO() {
return service.getAllDO();
}
}
When I tried accessing above controller using "localhost:8080/appName/somemapping/" it gave 404 error.
Edit: I have Websphere application server. If that has something to do with my issue.