使用Springboot的伙伴们,有没有这类需求:Springboot的功能正常使用,但不想外部调用API呢?怎样实现它呢? 找到了一方法,简单暴力: server.port=-1 将端口号设置成-1。