Subversion Repositories SmartDukaan

Rev

Rev 23017 | Rev 34405 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 23017 Rev 23950
Line 4... Line 4...
4
import java.nio.file.Files;
4
import java.nio.file.Files;
5
 
5
 
6
import javax.servlet.http.HttpServletRequest;
6
import javax.servlet.http.HttpServletRequest;
7
import javax.servlet.http.HttpServletResponse;
7
import javax.servlet.http.HttpServletResponse;
8
 
8
 
-
 
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.MediaType;
11
import org.springframework.http.MediaType;
11
import org.springframework.http.ResponseEntity;
12
import org.springframework.http.ResponseEntity;
12
import org.springframework.stereotype.Component;
13
import org.springframework.stereotype.Component;
13
 
14
 
Line 18... Line 19...
18
import com.spice.profitmandi.common.model.ResponseStatus;
19
import com.spice.profitmandi.common.model.ResponseStatus;
19
 
20
 
20
@Component
21
@Component
21
public class ResponseSender<T> {
22
public class ResponseSender<T> {
22
	
23
	
-
 
24
	
-
 
25
	@Autowired
23
	private final ObjectMapper objectMapper = new ObjectMapper();
26
	ObjectMapper objectMapper;
24
	
27
	
25
	public ResponseEntity<?> ok(Object response){
28
	public ResponseEntity<?> ok(Object response){
26
		return this.genericError(response, HttpStatus.OK, ResponseStatus.SUCCESS);
29
		return this.genericError(response, HttpStatus.OK, ResponseStatus.SUCCESS);
27
	}
30
	}
28
	public ResponseEntity<?> badRequest(Object response){
31
	public ResponseEntity<?> badRequest(Object response){