启动springboot报错UnsupportedOperationException:null

 

package com.witemedia.fmp;

import javax.annotation.PostConstruct;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;

import com.alibaba.dubbo.spring.boot.annotation.EnableDubboConfiguration;
import org.springframework.context.ApplicationContext;

import java.io.*;
import java.util.Properties;
/**
 * 同步服务
 */
@SpringBootApplication
@ServletComponentScan
@EnableDubboConfiguration
public class WmFmpSyncServiceProviderApplication {
    private static ApplicationContext applicationContext=null;
    public static ApplicationContext getContext(){
        return applicationContext;
    }
    public static void main(String[] args) {
        /**
         * 启动版本,配置文件名后缀
         */
        String configname="";
        for (int i=0;i< args.length;i++) {
            if(args[i].equals("-c") || args[i].equals("-config")) {
                if(i

15:33:58,623 | -INFO - 将记录器[hammock-cafe]的级别设置为ALL
15:33:58,623 | ch.qos.logback.classic.joran.action.LoggerAction中的-INFO - 在ch.qos.logback.classic.joran中将logger [user]的级别设置为ALL
15:33:58,623 | -INFO .action.ConfigurationAction - 配置结束
.15:33:58,624 | ch.qos.logback.classic.joran.JoranConfigurator@2a17b7b6中的-INFO - 将当前配置注册为安全回退点

SLF4J:实际绑定的类型为[ch.qos.logback.classic.util.ContextSelectorStaticBinder]

  .____ _ __ _ _
 / \\ / ___'_ _ _ _ _(_)_ __ _ _ _ \ \ \ \
(()\ ___ |'_ |'_ | |'_ \ / _` | \ \ \ \
 \ / ___)| | _)| | | | | || (_ | |))))
  '| ____ | .__ | _ | | _ | _ | | _ \ __,| / / / /
 ========= | _ | ============== | ___ / = / _ / _ / _ /
 :: Spring Boot ::(v1.5.10.RELEASE)

[INFO] [2018-12-27 15:33:58] com.witemedia.fmp.WmFmpSyncServiceProviderApplication [48] - 在具有PID 5780的某人(E:\ workdir \ 64svn \ server \ trunk \ wm-fmp-sync )上启动WmFmpSyncServiceProviderApplication -service-provider \ target \ classes由E:\ workdir \ 64svn \ server \ trunk中的jame启动
[INFO] [2018-12-27 15:33:59] com.witemedia.fmp.WmFmpSyncServiceProviderApplication [ 593] - 否活动配置文件集,回退到默认配置文件:默认
[INFO] [2018-12-27 15:33:59] org.hibernate.validator.internal.util.Version [30] - HV000001:Hibernate Validator 5.3.6.Final
[INFO] [2018-12-27 15:33:59] org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext [583] - 刷新org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@6356695f :启动日期[12月12日27 15:33:59 CST 2018]; 上下文层次结构的根
[错误] [2018-12-27 15:33:59] org.springframework.boot.SpringApplication [771] - 应用程序启动失败
java.lang.UnsupportedOperationException:null
    at java.util.AbstractCollection.add(AbstractCollection).java :262)atg.springframework.boot.web.servlet.ServletComponentScanRegistrar.updatePostProcessor(ServletComponentScanRegistrar.java:62)
    中的java.util.AbstractCollection.addAll(AbstractCollection.java:344

    在org.springframework.boot.web.servlet。 ServletComponentScanRegistrar.registerBeanDefinitions(ServletComponentScanRegistrar.java:48)
    在org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsFromRegistrars(ConfigurationClassBeanDefinitionReader.java:359)
    在org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader .loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:143)
   org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:116)
   org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor的.java:320)
    在org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:228)
    在org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:272)
    在org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:92)
    在org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:687)
    在org.springframework.context.support.AbstractApplicationContext.refresh (AbstractApplicationContext.java:525)
   org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
    org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)
    org.springframework.boot.SpringApplication .refreshContext(SpringApplication).java:360)
    atg.springframework.boot.SpringApplication.run(SpringApplication.java:303)
    at com.witemedia.fmp.WmFmpSyncServiceProviderApplication.main(WmFmpSyncServiceProviderApplication.java:51)
[INFO] [2018-12-27 15:33:59] org。 springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext [984] - 关闭org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@6356695f:启动日期[12月12日27 15:33:59 CST 2018]; 上下文层次结构的根

进程以退出代码1结束
问题是依赖问题,总服务不能直接依赖其他服务,检查相关pom可解决

你可能感兴趣的:(开发中遇到的问题)