Subversion Repositories SmartDukaan

Rev

Rev 22889 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
22866 ashik.ali 1
package com.spice.profitmandi.web.controller;
2
 
3
import javax.servlet.http.HttpServletRequest;
4
 
5
import org.slf4j.Logger;
6
import org.slf4j.LoggerFactory;
7
import org.springframework.beans.factory.annotation.Autowired;
8
import org.springframework.http.ResponseEntity;
9
import org.springframework.stereotype.Controller;
10
import org.springframework.transaction.annotation.Transactional;
11
import org.springframework.web.bind.annotation.RequestMapping;
12
import org.springframework.web.bind.annotation.RequestMethod;
13
 
14
import com.spice.profitmandi.common.model.ProfitMandiConstants;
15
import com.spice.profitmandi.common.web.util.ResponseSender;
16
import com.spice.profitmandi.dao.repository.dtr.GadgetCopsInsuranceCalcRepository;
17
 
18
@Controller
19
@Transactional(rollbackFor=Throwable.class)
20
public class InsuranceController {
21
 
22
	@Autowired
23
	ResponseSender<?> responseSender;
24
 
25
	private static final Logger LOGGER = LoggerFactory.getLogger(InsuranceController.class);
26
 
27
	@Autowired
28
	private GadgetCopsInsuranceCalcRepository gadgetCopsInsuranceCalcRepository;
29
 
30
	@RequestMapping(value = ProfitMandiConstants.URL_INSURANCE_GADGET_COPS_MAPPING, method=RequestMethod.GET)
31
	public ResponseEntity<?> getById(HttpServletRequest request){
32
		LOGGER.info("requested url : "+request.getRequestURL().toString());
33
		return responseSender.ok(gadgetCopsInsuranceCalcRepository.selectAll());
34
	}
35
 
36
}