环境:Mac OSX 10.13 IntelliJ IDEA 2017.2.5
我在应用程序属性中设置了server.port = 0。问题是Java不断尝试已经在使用的端口。
Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 51939; nested exception is:
java.net.BindException: Address already in use
Process finished with exit code 1
如何确保Java不选择使用过的端口?