0

I've a controller with @Controller and @RequestMapping annotations.

@Controller
@RequestMapping(value = "/copyRightVersion")
public class CopyrightAndVersionController extends BaseController {

    protected CopyrightAndVersionController() {
        super(CopyrightAndVersionController.class);
    }

    /**
     * Reads copyright and version from respective files.
     *
     * @return the model and view
     */
    @RequestMapping(value = "/getVersion", method = RequestMethod.GET)
    public ModelAndView getCopyrightAndVersion() {
        LOGGER.debug("in getCopyrightAndVersion method");
        ModelAndView mav = new ModelAndView("copyrightAndVersion");

        mav.getModelMap().put("copyright", "test copyright");
        mav.getModelMap().put("version", "test version");
        return mav;
    }

}

In logs I see that

 DispatcherServlet with name 'xtreme' processing GET request for [/Xtreme/copyRightVersion/getVersion.do]
Looking up handler method for path /copyRightVersion/getVersion.do
Returning handler method [public org.springframework.web.servlet.ModelAndView com.xtreme.controller.CopyrightAndVersionController.getCopyrightAndVersion()]
tableBeanFactory] - Returning cached instance of singleton bean 'copyrightAndVersionController'
 Last-Modified value for [/Xtreme/copyRightVersion/getVersion.do] is: -1
 Successfully completed request

It never hits Controller's method getCopyrightAndVersion() though DispatcherServlet correctly identified handler for this. It doesn't print message in log. Even in remote debugging it is not hit.

Am I missing something?

s.r
  • 2,507
  • 3
  • 22
  • 32

0 Answers0