Skip to content

Commit 3070e78

Browse files
committed
implementing IndexApi in IndexController
1 parent 611b3e2 commit 3070e78

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package com.csaba79coder.bestprotocol.controller;
2+
3+
import com.csaba79coder.bestprotocol.api.IndexApi;
4+
import org.springframework.http.ResponseEntity;
5+
import org.springframework.web.bind.annotation.CrossOrigin;
6+
import org.springframework.web.bind.annotation.RestController;
7+
8+
@RestController
9+
@CrossOrigin(value = "http://localhost:4200")
10+
public class IndexController implements IndexApi {
11+
12+
private final String INDEX = "index.html";
13+
14+
@Override
15+
public ResponseEntity<String> renderIndexPage() {
16+
return ResponseEntity.status(200).body(INDEX);
17+
}
18+
19+
@Override
20+
public ResponseEntity<String> renderIndexPage_0() {
21+
return ResponseEntity.status(200).body(INDEX);
22+
}
23+
}

0 commit comments

Comments
 (0)