异常如下: Exception in thread “main” java.lang.IllegalAccessException: Class org.springframework.boot.loader.MainMethodRunner can not access a member of class com.freight.FreightApplication with modifiers “public static” 原因: 经过排查原来是启动类没有 public 修饰符 哈哈哈哈,加上public 就好了