版本 springboot 2.1.5.RELEASE kafka 2.2 遇到的坑 用最新的springboot就要用最新的kafka版本! 当我启动云服务器上的zk后,再启动kafka后台日志也没报错,只感觉EndPoint日志信息有点奇怪,然后springboot项目连接kafka,老是有warn级别的日志:"Connection to node -1 could not be established. Broker may not be available.",这是未连接上ka
第一步:让启动类继承SpringBootServletInitializer,并重写configure方法,关键代码如下 @SpringBootApplication public class MySpringBootApplication extends SpringBootServletInitializer { public static void main(String[] args) { SpringApplication.run(MySpringBootApplication.cla