1. 程式人生 > >dubbo啟動報錯 No such extension com.alibaba.dubbo.container.Container by name --spring.output.ansi.enab

dubbo啟動報錯 No such extension com.alibaba.dubbo.container.Container by name --spring.output.ansi.enab

dubbo中的 springboot專案啟動報錯內容如下:

java.lang.IllegalStateException: No such extension com.alibaba.dubbo.container.Container by name --spring.output.ansi.enabled=always
	at com.alibaba.dubbo.common.extension.ExtensionLoader.findException(ExtensionLoader.java:494)
	at com.alibaba.dubbo.common.extension.ExtensionLoader.createExtension(ExtensionLoader.java:501)
	at com.alibaba.dubbo.common.extension.ExtensionLoader.getExtension(ExtensionLoader.java:319)
	at com.alibaba.dubbo.container.Main.main(Main.java:56)
	at com.snailf.config.PayApplication.main(PayApplication.java:12)
2018-09-18 14:21:07.036 [main] ERROR com.alibaba.dubbo.container.Main -  [DUBBO] No such extension com.alibaba.dubbo.container.Container by name --spring.output.ansi.enabled=always, dubbo version: 2.5.3, current host: 10.22.1.230
java.lang.IllegalStateException: No such extension com.alibaba.dubbo.container.Container by name --spring.output.ansi.enabled=always
	at com.alibaba.dubbo.common.extension.ExtensionLoader.findException(ExtensionLoader.java:494)
	at com.alibaba.dubbo.common.extension.ExtensionLoader.createExtension(ExtensionLoader.java:501)
	at com.alibaba.dubbo.common.extension.ExtensionLoader.getExtension(ExtensionLoader.java:319)
	at com.alibaba.dubbo.container.Main.main(Main.java:56)
	at com.snailf.config.PayApplication.main(PayApplication.java:12)

解決辦法:更改啟動方式,sts編輯器可能對springboot專案註冊到dubbo有影響,改為Java Application方式啟動即可

在這裡插入圖片描述 上圖啟動方式會報錯下圖啟動方式正確

在這裡插入圖片描述