我试图将一个请求转发给另一个接受GET请求的Spring控制器,但它告诉我不支持POST。下面是我的第一个控制器方法的相关部分,它接受一个POST请求,因为我将它用于一个登录函数。
@RequestMapping(value = "/login", method = RequestMethod.POST)
public String login(@ModelAttribute("administrator") Administrator administrator,
Model model) {
// code that's not ge
嗨,我在这个控制器里有一种连线行为。我有两种方法,Get准备以html形式显示的信息和POST以获得de submit:
控制器:
@Controller
public class NotificationController {
final String JSP_NOTIFICATION_01="pages/sendPush/createNotification";
final String JSP_NOTIFICATION_02="pages/sendPush/createNotificationStep2";
@Reque
我有一个spring-boot rest。
在我的application.properties中有:
server.port=8100
server.contextPath=/api/users
有一个控制器:
@RestController
@RequestMapping("")
public class UserService {
@RequestMapping(value = "", method = POST, produces = "application/json; charset=UTF-8")
public Res
在我的反应应用程序,这将显示。当我想要发邮件的时候。我使用.net核心2.2webapi作为后端。
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:5050/api/Users. (Reason: missing token ‘access-control-allow-origin’ in CORS header ‘Access-Control-Allow-Headers’ from CORS preflight chan
我没发现问题所在。
控制器
@RestController("/api")
public class CoordenadaController {
@Autowired private RepositorioCoordenada repositorioCoordenada;
@PostMapping("/salvar")
public void save(String nome, int coordenadaX, int coordenadaY) {
this.repositorioCoordenada.save(ne
我是一个Java新手,所以请耐心点。我做了这个程序,它从数据库中匹配我的密码和用户名。如果我输入正确的密码,就会弹出
HTTP Status 405 - HTTP method POST is not supported by this URL
--------------------------------------------------------------------------------
type Status report
message HTTP method POST is not supported by this URL
description The spe
在启动服务器时,我得到了这个异常:HTTP Status 405 - Request method 'GET' not supported
我的控制器是:
@Controller
public class HomeController {
private static final Logger logger = LoggerFactory.getLogger(HomeController.class);
@RequestMapping(value = "/", method = RequestMethod.POST)
public S
安装业务活动监视器后, wso2发布服务器不会打开。发生了一个错误。
"HTTP Status 405 - HTTP method GET is not supported by this URL
type Status report
message HTTP method GET is not supported by this URL
description The specified HTTP method is not allowed for the requested resource.
Apache Tomcat/7.0.34"
我正在尝试使用HttpClient发送一个帖子请求。
constructor (private http: HttpClient) { }
this.http.post(url + 'auth/login', data).subscribe(res => { });
但是浏览器发送4个请求,而不是只发送一个POST请求:
2选项请求1 POST 1 GET request
我读到它叫做“飞行前请求”
我收到了一个405 Method Not Allowed错误,因为服务器不支持这个路径The GET method is not supported for this ro
我正在学习Java Servlets。试图实现doPost()方法,但是我得到一个错误"HTTP status405- HTTP method POST is not supported by this URL“。
代码
<html>
<body>
<center>
<form name="Form1" action="http://localhost:8080/examples/servlet/ColorGetServlet" method="post">
<B>Color:&
我正在使用从Git获得配置,并且我已经在google中部署了我的服务。
当我在本地运行服务并调用POST http://localhost:8887/actuator/bus-refresh时,它成功运行。
但是当我调用部署在Google中的服务时,它给出了- Request method POST not supported,
{
"timestamp": "2020-05-31T13:42:56.641+0000",
"status": 405,
"error": "Method Not All