Rev 21734 | Rev 21740 | Go to most recent revision | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed
package com.spice.profitmandi.web.controller;import javax.servlet.http.HttpServletRequest;import org.slf4j.Logger;import org.slf4j.LoggerFactory;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.http.ResponseEntity;import org.springframework.stereotype.Controller;import org.springframework.transaction.annotation.Transactional;import org.springframework.web.bind.annotation.RequestMapping;import org.springframework.web.bind.annotation.RequestMethod;import org.springframework.web.bind.annotation.RequestParam;import com.spice.profitmandi.common.model.ProfitMandiConstants;import com.spice.profitmandi.dao.repository.logistics.PostOfficeRepository;import com.spice.profitmandi.web.util.ResponseSender;@Controller@Transactionalpublic class PostOfficeController {@AutowiredResponseSender<?> responseSender;private static final Logger LOGGER=LoggerFactory.getLogger(PostOfficeController.class);@AutowiredPostOfficeRepository postOfficeRepository;@RequestMapping(value = ProfitMandiConstants.URL_POST_OFFICE, method=RequestMethod.GET)public ResponseEntity<?> getByPin(HttpServletRequest request, @RequestParam(name = "pinCode") long pinCode){LOGGER.info("requested url : "+request.getRequestURL().toString());return responseSender.ok(postOfficeRepository.selectByPinCode(pinCode));}}