Home > database >  spring boot: error message "Request method 'POST' not supported" after migration
spring boot: error message "Request method 'POST' not supported" after migration

Time:09-21

I specify that the program worked well with java 1.8. However, as soon as I migrated to java 10, nothing works now and I get this error message every time I try to execute an http request in postman

capture console

I just added two more images. the first is the post method and the second is the response in postman

la methode POST

la réponse dans postman

CodePudding user response:

I solved my problem

the concern was that when migrating to a version of spring boot compatible with java 10, we have certain ways of declaring the properties in the application.properties file which change.

example: the program no longer recognizes: server.contextPath=... he now recognizes server.servlet.context-path=...

suddenly the error message: "Request method 'POST' not supported" is due to the fact that the context path was not found. it returned empty.

thank !!

  • Related