| Line 4... |
Line 4... |
| 4 |
|
4 |
|
| 5 |
import javax.servlet.http.HttpServletRequest;
|
5 |
import javax.servlet.http.HttpServletRequest;
|
| 6 |
|
6 |
|
| 7 |
import org.slf4j.Logger;
|
7 |
import org.slf4j.Logger;
|
| 8 |
import org.slf4j.LoggerFactory;
|
8 |
import org.slf4j.LoggerFactory;
|
| - |
|
9 |
import org.springframework.beans.factory.annotation.Autowired;
|
| 9 |
import org.springframework.http.HttpStatus;
|
10 |
import org.springframework.http.HttpStatus;
|
| 10 |
import org.springframework.http.ResponseEntity;
|
11 |
import org.springframework.http.ResponseEntity;
|
| 11 |
import org.springframework.stereotype.Controller;
|
12 |
import org.springframework.stereotype.Controller;
|
| 12 |
import org.springframework.web.bind.annotation.RequestMapping;
|
13 |
import org.springframework.web.bind.annotation.RequestMapping;
|
| 13 |
import org.springframework.web.bind.annotation.RequestMethod;
|
14 |
import org.springframework.web.bind.annotation.RequestMethod;
|
| 14 |
import org.springframework.web.bind.annotation.RequestParam;
|
15 |
import org.springframework.web.bind.annotation.RequestParam;
|
| 15 |
|
16 |
|
| 16 |
import com.spice.profitmandi.common.model.ProfitMandiConstants;
|
17 |
import com.spice.profitmandi.common.model.ProfitMandiConstants;
|
| 17 |
import com.spice.profitmandi.dao.repository.PostOfficeRepository;
|
18 |
import com.spice.profitmandi.dao.repository.PostOfficeRepository;
|
| 18 |
import com.spice.profitmandi.dao.repository.PostOfficeRepositoryImpl;
|
- |
|
| 19 |
import com.spice.profitmandi.web.model.ProfitMandiResponse;
|
19 |
import com.spice.profitmandi.web.model.ProfitMandiResponse;
|
| 20 |
import com.spice.profitmandi.web.model.Response;
|
20 |
import com.spice.profitmandi.web.model.Response;
|
| 21 |
import com.spice.profitmandi.web.model.ResponseStatus;
|
21 |
import com.spice.profitmandi.web.model.ResponseStatus;
|
| 22 |
|
22 |
|
| 23 |
@Controller
|
23 |
@Controller
|
| 24 |
public class PostOfficeController {
|
24 |
public class PostOfficeController {
|
| 25 |
|
25 |
|
| 26 |
private static final Logger LOGGER=LoggerFactory.getLogger(PostOfficeController.class);
|
26 |
private static final Logger LOGGER=LoggerFactory.getLogger(PostOfficeController.class);
|
| 27 |
|
27 |
|
| - |
|
28 |
@Autowired
|
| 28 |
private PostOfficeRepository postOfficeRepository = PostOfficeRepositoryImpl.getInstance();
|
29 |
PostOfficeRepository postOfficeRepository;
|
| 29 |
|
30 |
|
| 30 |
@RequestMapping(value = ProfitMandiConstants.URL_POST_OFFICE, method=RequestMethod.GET)
|
31 |
@RequestMapping(value = ProfitMandiConstants.URL_POST_OFFICE, method=RequestMethod.GET)
|
| 31 |
public ResponseEntity<?> getByPin(HttpServletRequest request, @RequestParam(name = "pinCode") long pinCode){
|
32 |
public ResponseEntity<?> getByPin(HttpServletRequest request, @RequestParam(name = "pinCode") long pinCode){
|
| 32 |
LOGGER.info("requested url : "+request.getRequestURL().toString());
|
33 |
LOGGER.info("requested url : "+request.getRequestURL().toString());
|
| 33 |
try {
|
34 |
try {
|