25
25
import org .springframework .http .ResponseEntity ;
26
26
import org .springframework .stereotype .Controller ;
27
27
import org .springframework .ui .Model ;
28
+ import org .springframework .web .bind .annotation .CrossOrigin ;
28
29
import org .springframework .web .bind .annotation .RequestMapping ;
29
30
import org .springframework .web .bind .annotation .RequestMethod ;
30
31
@@ -38,13 +39,15 @@ public class BackEndInformationController {
38
39
@ Autowired
39
40
private BackEndInfoirmationControllerUtils backEndInfoContUtils ;
40
41
42
+ @ CrossOrigin
41
43
@ RequestMapping (value = "/backend" , method = RequestMethod .GET )
42
44
public ResponseEntity <String > getInstances (Model model , HttpServletRequest request ) {
43
45
LOG .debug ("Recieved request for instances." );
44
46
ResponseEntity <String > response = backEndInfoContUtils .handleRequestForInstances (request );
45
47
return response ;
46
48
}
47
49
50
+ @ CrossOrigin
48
51
@ RequestMapping (value = "/backend" , method = RequestMethod .PUT )
49
52
public ResponseEntity <String > switchBackEndInstance (Model model , HttpServletRequest request ) {
50
53
LOG .debug ("Recieved request to switch back end." );
@@ -53,13 +56,15 @@ public ResponseEntity<String> switchBackEndInstance(Model model, HttpServletRequ
53
56
54
57
}
55
58
59
+ @ CrossOrigin
56
60
@ RequestMapping (value = "/backend" , method = RequestMethod .DELETE )
57
61
public ResponseEntity <String > deleteBackEndInstance (Model model , HttpServletRequest request ) {
58
62
LOG .debug ("Recieved request to delete back end." );
59
63
ResponseEntity <String > response = backEndInfoContUtils .handleRequestToDeleteBackEnd (request );
60
64
return response ;
61
65
}
62
66
67
+ @ CrossOrigin
63
68
@ RequestMapping (value = "/backend" , method = RequestMethod .POST )
64
69
public ResponseEntity <String > addInstanceInformation (Model model , HttpServletRequest request ) {
65
70
LOG .debug ("Recieved request to add back end." );
0 commit comments