Revize 930895bd
Přidáno uživatelem Václav Jirák před téměř 6 roky(ů)
backend/src/main/java/cz/zcu/yamanager/ws/rest/HelloController.java | ||
---|---|---|
3 | 3 |
import cz.zcu.yamanager.domain.Test; |
4 | 4 |
import cz.zcu.yamanager.repository.HelloRepository; |
5 | 5 |
import org.springframework.beans.factory.annotation.Autowired; |
6 |
import org.springframework.web.bind.annotation.CrossOrigin; |
|
6 | 7 |
import org.springframework.web.bind.annotation.RequestMapping; |
7 | 8 |
import org.springframework.web.bind.annotation.RequestParam; |
8 | 9 |
import org.springframework.web.bind.annotation.RestController; |
... | ... | |
13 | 14 |
import static cz.zcu.yamanager.util.localization.Message.getString; |
14 | 15 |
import static org.springframework.web.bind.annotation.RequestMethod.GET; |
15 | 16 |
|
17 |
@CrossOrigin(origins = "http://localhost:4200") |
|
16 | 18 |
@RestController |
17 | 19 |
public class HelloController { |
18 | 20 |
|
backend/src/main/java/cz/zcu/yamanager/ws/rest/TestController.java | ||
---|---|---|
1 | 1 |
package cz.zcu.yamanager.ws.rest; |
2 | 2 |
|
3 |
import org.springframework.web.bind.annotation.CrossOrigin; |
|
3 | 4 |
import org.springframework.web.bind.annotation.RequestMapping; |
4 | 5 |
import org.springframework.web.bind.annotation.RestController; |
5 | 6 |
|
6 | 7 |
import static org.springframework.web.bind.annotation.RequestMethod.GET; |
7 | 8 |
import static org.springframework.web.bind.annotation.RequestMethod.POST; |
8 | 9 |
|
10 |
@CrossOrigin(origins = "http://localhost:4200") |
|
9 | 11 |
@RestController("/test") |
10 | 12 |
public class TestController { |
11 | 13 |
|
Také k dispozici: Unified diff
Re #7264 CORS fix for development enviroment