java.net.MalformedURLException: no protocol exception resolved! ! !

No protocol is the key, protocol means the protocol, so the exception is that the protocol is not added when requesting

For example, the request address is directly:

192.168.XX.XXX:端口号/项目名/接口

This exception will occur, and the solution is very simple, just add http:// before the address , that is to say, change the request address to:

http://192.168.XX.XXX:端口号/项目名/接口

There will be no "no agreement exception"

Insert picture description here

Guess you like

Origin blog.csdn.net/qq_42258975/article/details/107977541