• Caused by: java.lang.ClassNotFoundException: org.springframework.web.socket.server.standard.ServerEndpointExporter


    Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/web/socket/server/standard/ServerEndpointExporter
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
        at java.lang.Class.getDeclaredMethods(Class.java:1975)
        at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:613)
        at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:524)
        at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:510)
        at org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(ReflectionUtils.java:570)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:697)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:640)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:609)
        at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1484)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:425)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:395)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:515)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:508)
        at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1188)
        at org.springframework.boot.SpringApplication.getExitCodeFromMappedException(SpringApplication.java:818)
        at org.springframework.boot.SpringApplication.getExitCodeFromException(SpringApplication.java:804)
        at org.springframework.boot.SpringApplication.handleExitCode(SpringApplication.java:790)
        at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:744)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:314)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107)
        at com.ros.RosApplication.main(RosApplication.java:19)
    Caused by: java.lang.ClassNotFoundException: org.springframework.web.socket.server.standard.ServerEndpointExporter
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 24 more

    是因为我在包的引用过程中加入了在编译时才使用这个类

    <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-websocket</artifactId>
    <scope>provided</scope>
    </dependency>
  • 相关阅读:
    HTTP协议概述
    Linux grep
    用bindService()启动Service的方式与生命周期
    关于服务Service使用startService()函数启动时的生命周期
    sendStickyBroadCast函数的使用
    让Eclipse全屏的插件
    多个BroadCastReceiver同时匹配同一类Intent发送的消息的情况
    JFileChooser的使用心得(FileFilter)
    php mysql实现无限级分类 | 树型显示分类关系
    关于php扩展编程如何返回数组的问题
  • 原文地址:https://www.cnblogs.com/youran-he/p/9591323.html
Copyright © 2020-2023  润新知