|
发表于 2019-7-2 16:19:49
|
显示全部楼层
本帖最后由 holy 于 2019-7-2 16:21 编辑
V 2.0.1 有没有谁遇到过 swagger2 在启动时报错- <pre style="box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 11.9px; overflow-wrap: normal; background-color: rgb(246, 248, 250); border-radius: 3px; line-height: 1.45; overflow: auto; padding: 16px; color: rgb(36, 41, 46);"><code style="box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; background: transparent; border-radius: 3px; border: 0px; word-break: normal; display: inline; line-height: inherit; overflow: visible; overflow-wrap: normal;">2019-07-02 10:52:13.353 [main] ERROR org.springframework.boot.SpringApplication:858 - Application run failed
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serviceModelToSwagger2MapperImpl': Lookup method resolution failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [springfox.documentation.swagger2.mappers.ServiceModelToSwagger2MapperImpl] from ClassLoader [sun.misc.Launcher$AppClassLoader@18b4aac2]
- at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:265)
- at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:1253)
- at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1168)
- at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
- at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
- at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
- at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
- at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
- at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
- at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:849)
- at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877)
- at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
- at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142)
- at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)
- at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
- at org.springframework.boot.SpringApplication.run(SpringApplication.java:316)
- at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260)
- at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248)
- at org.jeecg.JeecgApplication.main(JeecgApplication.java:23)
- Caused by: java.lang.IllegalStateException: Failed to introspect Class [springfox.documentation.swagger2.mappers.ServiceModelToSwagger2MapperImpl] from ClassLoader [sun.misc.Launcher$AppClassLoader@18b4aac2]
- at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:686)
- at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:583)
- at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:568)
- at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:248)
- ... 18 common frames omitted
- Caused by: java.lang.NoClassDefFoundError: io/swagger/models/Contact
- 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:668)
- ... 21 common frames omitted
- Caused by: java.lang.ClassNotFoundException: io.swagger.models.Contact
- 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)
- ... 25 common frames omitted</code></pre>
复制代码 |
|