这个应用使用了一个带有springboot和spring security的rest服务。“,那么只有当我意识到来自有效URL (在spring安全配置setAllowedOrigins中)的请愿书时,我才能获得所有数据。因此,我知道我的rest服务配置正在工作。' to fetch the resource with CORS disabled.Chrome网络日志显示:(失败)net
我想发送一个json到我的RESTAPI。我用Postman试过了,它工作得很好。现在我想从我的前端发送数据。我不知道我需要在哪里添加标题以及如何添加。我在我的BackEnd上使用Springboot,在FrontEnd上使用Vue。我的控制器: @RestControllerpublic class FileController {