以下是本人在项目中遇到的SpringBoot启动报错问题,仅供参考。
问题一:org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [com.heren.ois.Application]; nested exception is org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'outpatientStrategyService' for bean class [com.heren.ois.queuing.triage.service.impl.OutpatientStrategyServiceImpl] conflicts(冲突) with existing, non-compatible(不兼容) bean definition of same name and class [com.heren.ois.queuing.triage.outpatient.service.impl.OutpatientStrategyServiceImpl]
解决:outpatientStrategyService注解名有两个相同,更改注解名。
问题二:org.apache.ibatis.type.TypeException: The alias(号别) 'OutpatientStrategyServiceImpl' is already mapped to the value 'com.heren.ois.queuing.triage.outpatient.service.impl.OutpatientStrategyServiceImpl'.
解决:OutpatientStrategyServiceImpl将该类名称更改。
问题三:com.alibaba.dubbo.rpc.RpcException: Fail to start server(url: ....) Failed to bind NettyServer on ......Failed to bind to:......
解决:查看配置文件中dubbo配置是否有问题。
问题四:com.alibaba.dubbo.remoting.RemotingException :[DUBBO] Failed to start NettyClient SC-201806031745/192.168.211.1 connect to the server /192.168.1.107:20880….
解决:出现此错误,可通过ipconfig查看本机ip地址情况。若此处的192.168.211.1不是本机IP地址,可能是因为虚拟机连接网络的原因。可关闭虚拟机连接网络。如下图。
问题五:若出现${heren.ois.infopublish}问题,解决:找到${heren.ois.infopublish}所在的类,将其所在的注解及字段都注释掉。
问题六:org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
考虑:WebService的发布地址,以及8080端口是否被占用