Open zhoukc opened 2 years ago
你有没有某个List
package com.cloud.tenmokucloud.frame.annotation;
import com.cloud.tenmokucloud.frame.validator.EnumValidator;
import javax.validation.Constraint; import javax.validation.Payload; import java.lang.annotation.Documented; import java.lang.annotation.Repeatable; import java.lang.annotation.Retention; import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*; import static java.lang.annotation.RetentionPolicy.RUNTIME;
@Documented @Target({METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE}) @Retention(RUNTIME) @Repeatable(EnumValidation.List.class) @Constraint(validatedBy = {EnumValidator.class}) public @interface EnumValidation {
String message() default "类型不存在";
Class<?>[] groups() default {};
Class<? extends Payload>[] payload() default {};
/**
/**
/**
}
这个算吗 | 17195877391 | |
---|---|---|
@. | 签名由网易邮箱大师定制 在2021年12月11日 @.> 写道:
你有没有某个List 里面T的泛型比较奇怪的
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
不晓得 你可以把请求或响应里面带范型并且比较奇怪的注释一下 再启动不报错就应该是. 我抽时间试试你发的这种情况
好的,我试试,多谢
---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2021年12月12日 16:04 | | 收件人 | @.> | | 抄送至 | @.**@.> | | 主题 | Re: [NoBugBoy/YDoc] springboot 2.4.5 引入 ydoc 1.1.3 cannot be cast to java.lang.Class (Issue #18) |
不晓得 你可以把请求或响应里面带范型并且比较奇怪的注释一下 再启动不报错就应该是. 我抽时间试试你发的这种情况
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
Id | Description | Screenshot |
---|---|---|
1 | 1.1.5版本,在 baseResponse 方法中这行语句 objectTypeJson.put(declaredField.getName(), deepObject(KvFactory.get().empty(), declaredField)); 遇到声明字段 declaredField=transient java.util.Set java.util.HashMap.entrySet 时,放入字典集合失败了,也抛出反射无法转化泛型的异常。 |
|
2 | 再深入一点,是在哪里发生转换的呢? 从核心类追踪 Core ⇒ deepObject 深度对象方法,分析和记录对象之间的关系 ⇒ collectionProcess 收集进程方法:截获对象的各种签名,最终定位在这行 Class<?> actualTypeArgument = (Class<?>) pt.getActualTypeArguments()[0]; 做了一次泛型转化,实际上没有 (Class<?>) ,Set 集合也可直接获取真实类型参数,但加了 (Class<?>) 就抛出反射转化的异常了。 |
|
3 | 反过来想,返回数据为集合的业务场景是什么样的呢?还原事故现场,从入口参数 docApi 找线索。 |
|
4 | 从 URL 字段定位到 Controller,这个方法将实体类放入包装器 R 的 map 中。因为服务之间传输数据,需要转换各种实体类,自己封装了支持任意类型的 TypeReference 相关方法。 |
现在查看 1.1.6.final 版本 Core.collectionProcess#L68 方法, 也没有修改到 (Class<?>)
方法。我觉得这里可以提前先做个例外判断,遇到 map 不用泛型转化,其他再转。 @NoBugBoy
我的配置
ydoc:
enable: true
host: http://111.222.333.444:40001
token: 81***f6a
headers: avoidNpe
启动日志
C:\Users\miozus\.jdks\corretto-1.8.0_322\bin\java.exe -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:59223,suspend=y,server=n -Dvisualvm.id=59123544437300 -Xmx100m -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -javaagent:E:\JetBrains\Toolbox\apps\IDEA-U\ch-1\221.4165.146\plugins\java\lib\rt\debugger-agent.jar -Dfile.encoding=UTF-8 -classpath C:\Users\miozus\.jdks\corretto-1.8.0_322\jre\lib\charsets.jar;C:\Users\miozus\.jdks\corretto-1.8.0_322\jre\lib\ext\access-bridge-64.jar;C:\Users\miozus\.jdks\corretto-1.8.0_322\jre\lib\ext\cldrdata.jar;C:\Users\miozus\.jdks\corretto-1.8.0_322\jre\lib\ext\dnsns.jar;C:\Users\miozus\.jdks\corretto-1.8.0_322\jre\lib\ext\jaccess.jar;C:\Users\miozus\.jdks\corretto-1.8.0_322\jre\lib\ext\jfxrt.jar;C:\Users\miozus\.jdks\corretto-1.8.0_322\jre\lib\ext\localedata.jar;C:\Users\miozus\.jdks\corretto-1.8.0_322\jre\lib\ext\nashorn.jar;C:\Users\miozus\.jdks\corretto-1.8.0_322\jre\lib\ext\sunec.jar;C:\Users\miozus\.jdks\corretto-1.8.0_322\jre\lib\ext\sunjce_provider.jar;C:\Users\miozus\.jdks\corretto-1.8.0_322\jre\lib\ext\sunmscapi.jar;C:\Users\miozus\.jdks\corretto-1.8.0_322\jre\lib\ext\sunpkcs11.jar;C:\Users\miozus\.jdks\corretto-1.8.0_322\jre\lib\ext\zipfs.jar;C:\Users\miozus\.jdks\corretto-1.8.0_322\jre\lib\jce.jar;C:\Users\miozus\.jdks\corretto-1.8.0_322\jre\lib\jfr.jar;C:\Users\miozus\.jdks\corretto-1.8.0_322\jre\lib\jfxswt.jar;C:\Users\miozus\.jdks\corretto-1.8.0_322\jre\lib\jsse.jar;C:\Users\miozus\.jdks\corretto-1.8.0_322\jre\lib\management-agent.jar;C:\Users\miozus\.jdks\corretto-1.8.0_322\jre\lib\resources.jar;C:\Users\miozus\.jdks\corretto-1.8.0_322\jre\lib\rt.jar;E:\projects\IdeaProjects\gulimall\gulimall-order\target\classes;D:\server\maven\repository\com\alipay\sdk\alipay-sdk-java\4.22.30.ALL\alipay-sdk-java-4.22.30.ALL.jar;D:\server\maven\repository\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;D:\server\maven\repository\com\alibaba\fastjson\1.2.78\fastjson-1.2.78.jar;D:\server\maven\repository\org\bouncycastle\bcprov-jdk15on\1.62\bcprov-jdk15on-1.62.jar;D:\server\maven\repository\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar;D:\server\maven\repository\xml-apis\xml-apis\1.0.b2\xml-apis-1.0.b2.jar;D:\server\maven\repository\org\springframework\boot\spring-boot-starter-data-redis\2.3.2.RELEASE\spring-boot-starter-data-redis-2.3.2.RELEASE.jar;D:\server\maven\repository\org\springframework\boot\spring-boot-starter\2.3.2.RELEASE\spring-boot-starter-2.3.2.RELEASE.jar;D:\server\maven\repository\org\springframework\boot\spring-boot\2.3.2.RELEASE\spring-boot-2.3.2.RELEASE.jar;D:\server\maven\repository\org\springframework\boot\spring-boot-autoconfigure\2.3.2.RELEASE\spring-boot-autoconfigure-2.3.2.RELEASE.jar;D:\server\maven\repository\org\springframework\boot\spring-boot-starter-logging\2.3.2.RELEASE\spring-boot-starter-logging-2.3.2.RELEASE.jar;D:\server\maven\repository\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;D:\server\maven\repository\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;D:\server\maven\repository\org\apache\logging\log4j\log4j-to-slf4j\2.13.3\log4j-to-slf4j-2.13.3.jar;D:\server\maven\repository\org\apache\logging\log4j\log4j-api\2.13.3\log4j-api-2.13.3.jar;D:\server\maven\repository\org\slf4j\jul-to-slf4j\1.7.30\jul-to-slf4j-1.7.30.jar;D:\server\maven\repository\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5.jar;D:\server\maven\repository\org\yaml\snakeyaml\1.26\snakeyaml-1.26.jar;D:\server\maven\repository\org\springframework\data\spring-data-redis\2.3.2.RELEASE\spring-data-redis-2.3.2.RELEASE.jar;D:\server\maven\repository\org\springframework\data\spring-data-keyvalue\2.3.2.RELEASE\spring-data-keyvalue-2.3.2.RELEASE.jar;D:\server\maven\repository\org\springframework\data\spring-data-commons\2.3.2.RELEASE\spring-data-commons-2.3.2.RELEASE.jar;D:\server\maven\repository\org\springframework\spring-tx\5.2.8.RELEASE\spring-tx-5.2.8.RELEASE.jar;D:\server\maven\repository\org\springframework\spring-oxm\5.2.8.RELEASE\spring-oxm-5.2.8.RELEASE.jar;D:\server\maven\repository\org\springframework\spring-aop\5.2.8.RELEASE\spring-aop-5.2.8.RELEASE.jar;D:\server\maven\repository\org\springframework\spring-context-support\5.2.8.RELEASE\spring-context-support-5.2.8.RELEASE.jar;D:\server\maven\repository\org\slf4j\slf4j-api\1.7.30\slf4j-api-1.7.30.jar;D:\server\maven\repository\io\lettuce\lettuce-core\5.3.2.RELEASE\lettuce-core-5.3.2.RELEASE.jar;D:\server\maven\repository\io\netty\netty-common\4.1.51.Final\netty-common-4.1.51.Final.jar;D:\server\maven\repository\io\netty\netty-handler\4.1.51.Final\netty-handler-4.1.51.Final.jar;D:\server\maven\repository\io\netty\netty-resolver\4.1.51.Final\netty-resolver-4.1.51.Final.jar;D:\server\maven\repository\io\netty\netty-buffer\4.1.51.Final\netty-buffer-4.1.51.Final.jar;D:\server\maven\repository\io\netty\netty-codec\4.1.51.Final\netty-codec-4.1.51.Final.jar;D:\server\maven\repository\io\netty\netty-transport\4.1.51.Final\netty-transport-4.1.51.Final.jar;D:\server\maven\repository\io\projectreactor\reactor-core\3.3.8.RELEASE\reactor-core-3.3.8.RELEASE.jar;D:\server\maven\repository\org\reactivestreams\reactive-streams\1.0.3\reactive-streams-1.0.3.jar;D:\server\maven\repository\org\springframework\session\spring-session-data-redis\2.3.0.RELEASE\spring-session-data-redis-2.3.0.RELEASE.jar;D:\server\maven\repository\org\springframework\session\spring-session-core\2.3.0.RELEASE\spring-session-core-2.3.0.RELEASE.jar;D:\server\maven\repository\org\springframework\spring-jcl\5.2.8.RELEASE\spring-jcl-5.2.8.RELEASE.jar;D:\server\maven\repository\org\springframework\boot\spring-boot-starter-amqp\2.3.2.RELEASE\spring-boot-starter-amqp-2.3.2.RELEASE.jar;D:\server\maven\repository\org\springframework\spring-messaging\5.2.8.RELEASE\spring-messaging-5.2.8.RELEASE.jar;D:\server\maven\repository\org\springframework\spring-beans\5.2.8.RELEASE\spring-beans-5.2.8.RELEASE.jar;D:\server\maven\repository\org\springframework\amqp\spring-rabbit\2.2.9.RELEASE\spring-rabbit-2.2.9.RELEASE.jar;D:\server\maven\repository\com\rabbitmq\amqp-client\5.9.0\amqp-client-5.9.0.jar;D:\server\maven\repository\org\springframework\amqp\spring-amqp\2.2.9.RELEASE\spring-amqp-2.2.9.RELEASE.jar;D:\server\maven\repository\org\springframework\retry\spring-retry\1.2.5.RELEASE\spring-retry-1.2.5.RELEASE.jar;D:\server\maven\repository\org\springframework\spring-context\5.2.8.RELEASE\spring-context-5.2.8.RELEASE.jar;D:\server\maven\repository\org\springframework\boot\spring-boot-starter-thymeleaf\2.3.2.RELEASE\spring-boot-starter-thymeleaf-2.3.2.RELEASE.jar;D:\server\maven\repository\org\thymeleaf\thymeleaf-spring5\3.0.11.RELEASE\thymeleaf-spring5-3.0.11.RELEASE.jar;D:\server\maven\repository\org\thymeleaf\thymeleaf\3.0.11.RELEASE\thymeleaf-3.0.11.RELEASE.jar;D:\server\maven\repository\org\attoparser\attoparser\2.0.5.RELEASE\attoparser-2.0.5.RELEASE.jar;D:\server\maven\repository\org\unbescape\unbescape\1.1.6.RELEASE\unbescape-1.1.6.RELEASE.jar;D:\server\maven\repository\org\thymeleaf\extras\thymeleaf-extras-java8time\3.0.4.RELEASE\thymeleaf-extras-java8time-3.0.4.RELEASE.jar;E:\projects\IdeaProjects\gulimall\gulimall-common\target\classes;D:\server\maven\repository\cn\hutool\hutool-all\5.7.20\hutool-all-5.7.20.jar;D:\server\maven\repository\com\baomidou\mybatis-plus-boot-starter\3.3.1\mybatis-plus-boot-starter-3.3.1.jar;D:\server\maven\repository\com\baomidou\mybatis-plus\3.3.1\mybatis-plus-3.3.1.jar;D:\server\maven\repository\com\baomidou\mybatis-plus-extension\3.3.1\mybatis-plus-extension-3.3.1.jar;D:\server\maven\repository\com\baomidou\mybatis-plus-core\3.3.1\mybatis-plus-core-3.3.1.jar;D:\server\maven\repository\com\baomidou\mybatis-plus-annotation\3.3.1\mybatis-plus-annotation-3.3.1.jar;D:\server\maven\repository\com\github\jsqlparser\jsqlparser\3.1\jsqlparser-3.1.jar;D:\server\maven\repository\org\mybatis\mybatis\3.5.3\mybatis-3.5.3.jar;D:\server\maven\repository\org\mybatis\mybatis-spring\2.0.3\mybatis-spring-2.0.3.jar;D:\server\maven\repository\org\springframework\boot\spring-boot-starter-jdbc\2.3.2.RELEASE\spring-boot-starter-jdbc-2.3.2.RELEASE.jar;D:\server\maven\repository\com\zaxxer\HikariCP\3.4.5\HikariCP-3.4.5.jar;D:\server\maven\repository\org\springframework\spring-jdbc\5.2.8.RELEASE\spring-jdbc-5.2.8.RELEASE.jar;D:\server\maven\repository\org\projectlombok\lombok\1.18.12\lombok-1.18.12.jar;D:\server\maven\repository\mysql\mysql-connector-java\8.0.21\mysql-connector-java-8.0.21.jar;D:\server\maven\repository\org\apache\httpcomponents\httpcore\4.4.13\httpcore-4.4.13.jar;D:\server\maven\repository\commons-lang\commons-lang\2.6\commons-lang-2.6.jar;D:\server\maven\repository\javax\validation\validation-api\2.0.1.Final\validation-api-2.0.1.Final.jar;D:\server\maven\repository\org\hibernate\validator\hibernate-validator\6.1.5.Final\hibernate-validator-6.1.5.Final.jar;D:\server\maven\repository\jakarta\validation\jakarta.validation-api\2.0.2\jakarta.validation-api-2.0.2.jar;D:\server\maven\repository\org\jboss\logging\jboss-logging\3.4.1.Final\jboss-logging-3.4.1.Final.jar;D:\server\maven\repository\com\fasterxml\classmate\1.5.1\classmate-1.5.1.jar;D:\server\maven\repository\com\alibaba\cloud\spring-cloud-starter-alibaba-nacos-discovery\2.2.5.RELEASE\spring-cloud-starter-alibaba-nacos-discovery-2.2.5.RELEASE.jar;D:\server\maven\repository\com\alibaba\cloud\spring-cloud-alibaba-commons\2.2.5.RELEASE\spring-cloud-alibaba-commons-2.2.5.RELEASE.jar;D:\server\maven\repository\com\alibaba\nacos\nacos-client\1.4.1\nacos-client-1.4.1.jar;D:\server\maven\repository\com\alibaba\nacos\nacos-common\1.4.1\nacos-common-1.4.1.jar;D:\server\maven\repository\commons-io\commons-io\2.2\commons-io-2.2.jar;D:\server\maven\repository\org\apache\httpcomponents\httpasyncclient\4.1.4\httpasyncclient-4.1.4.jar;D:\server\maven\repository\org\apache\httpcomponents\httpcore-nio\4.4.13\httpcore-nio-4.4.13.jar;D:\server\maven\repository\com\alibaba\nacos\nacos-api\1.4.1\nacos-api-1.4.1.jar;D:\server\maven\repository\com\google\guava\guava\29.0-jre\guava-29.0-jre.jar;D:\server\maven\repository\com\google\guava\failureaccess\1.0.1\failureaccess-1.0.1.jar;D:\server\maven\repository\com\google\guava\listenablefuture\9999.0-empty-to-avoid-conflict-with-guava\listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar;D:\server\maven\repository\org\checkerframework\checker-qual\2.11.1\checker-qual-2.11.1.jar;D:\server\maven\repository\com\google\errorprone\error_prone_annotations\2.3.4\error_prone_annotations-2.3.4.jar;D:\server\maven\repository\com\google\j2objc\j2objc-annotations\1.3\j2objc-annotations-1.3.jar;D:\server\maven\repository\commons-codec\commons-codec\1.14\commons-codec-1.14.jar;D:\server\maven\repository\com\fasterxml\jackson\core\jackson-core\2.11.1\jackson-core-2.11.1.jar;D:\server\maven\repository\io\prometheus\simpleclient\0.5.0\simpleclient-0.5.0.jar;D:\server\maven\repository\com\alibaba\spring\spring-context-support\1.0.10\spring-context-support-1.0.10.jar;D:\server\maven\repository\org\springframework\cloud\spring-cloud-context\2.2.4.RELEASE\spring-cloud-context-2.2.4.RELEASE.jar;D:\server\maven\repository\org\springframework\cloud\spring-cloud-starter-netflix-ribbon\2.2.4.RELEASE\spring-cloud-starter-netflix-ribbon-2.2.4.RELEASE.jar;D:\server\maven\repository\org\springframework\cloud\spring-cloud-starter-netflix-archaius\2.2.4.RELEASE\spring-cloud-starter-netflix-archaius-2.2.4.RELEASE.jar;D:\server\maven\repository\com\netflix\ribbon\ribbon\2.3.0\ribbon-2.3.0.jar;D:\server\maven\repository\com\netflix\ribbon\ribbon-transport\2.3.0\ribbon-transport-2.3.0.jar;D:\server\maven\repository\io\reactivex\rxnetty-contexts\0.4.9\rxnetty-contexts-0.4.9.jar;D:\server\maven\repository\io\reactivex\rxnetty-servo\0.4.9\rxnetty-servo-0.4.9.jar;D:\server\maven\repository\javax\inject\javax.inject\1\javax.inject-1.jar;D:\server\maven\repository\io\reactivex\rxnetty\0.4.9\rxnetty-0.4.9.jar;D:\server\maven\repository\com\netflix\ribbon\ribbon-core\2.3.0\ribbon-core-2.3.0.jar;D:\server\maven\repository\com\netflix\ribbon\ribbon-httpclient\2.3.0\ribbon-httpclient-2.3.0.jar;D:\server\maven\repository\commons-collections\commons-collections\3.2.2\commons-collections-3.2.2.jar;D:\server\maven\repository\org\apache\httpcomponents\httpclient\4.5.12\httpclient-4.5.12.jar;D:\server\maven\repository\com\sun\jersey\jersey-client\1.19.1\jersey-client-1.19.1.jar;D:\server\maven\repository\com\sun\jersey\jersey-core\1.19.1\jersey-core-1.19.1.jar;D:\server\maven\repository\javax\ws\rs\jsr311-api\1.1.1\jsr311-api-1.1.1.jar;D:\server\maven\repository\com\sun\jersey\contribs\jersey-apache-client4\1.19.1\jersey-apache-client4-1.19.1.jar;D:\server\maven\repository\com\netflix\servo\servo-core\0.12.21\servo-core-0.12.21.jar;D:\server\maven\repository\com\netflix\netflix-commons\netflix-commons-util\0.3.0\netflix-commons-util-0.3.0.jar;D:\server\maven\repository\com\netflix\ribbon\ribbon-loadbalancer\2.3.0\ribbon-loadbalancer-2.3.0.jar;D:\server\maven\repository\com\netflix\netflix-commons\netflix-statistics\0.1.1\netflix-statistics-0.1.1.jar;D:\server\maven\repository\io\reactivex\rxjava\1.3.8\rxjava-1.3.8.jar;D:\server\maven\repository\com\alibaba\cloud\spring-cloud-starter-alibaba-nacos-config\2.2.5.RELEASE\spring-cloud-starter-alibaba-nacos-config-2.2.5.RELEASE.jar;D:\server\maven\repository\org\springframework\spring-web\5.2.8.RELEASE\spring-web-5.2.8.RELEASE.jar;D:\server\maven\repository\com\github\nobugboy\ydoc-spring-boot-starter\1.1.5\ydoc-spring-boot-starter-1.1.5.jar;D:\server\maven\repository\org\springframework\boot\spring-boot-starter-mail\2.3.2.RELEASE\spring-boot-starter-mail-2.3.2.RELEASE.jar;D:\server\maven\repository\com\sun\mail\jakarta.mail\1.6.5\jakarta.mail-1.6.5.jar;D:\server\maven\repository\com\sun\activation\jakarta.activation\1.2.2\jakarta.activation-1.2.2.jar;D:\server\maven\repository\io\springfox\springfox-swagger2\2.9.2\springfox-swagger2-2.9.2.jar;D:\server\maven\repository\io\swagger\swagger-annotations\1.5.20\swagger-annotations-1.5.20.jar;D:\server\maven\repository\io\swagger\swagger-models\1.5.20\swagger-models-1.5.20.jar;D:\server\maven\repository\io\springfox\springfox-spi\2.9.2\springfox-spi-2.9.2.jar;D:\server\maven\repository\io\springfox\springfox-core\2.9.2\springfox-core-2.9.2.jar;D:\server\maven\repository\io\springfox\springfox-schema\2.9.2\springfox-schema-2.9.2.jar;D:\server\maven\repository\io\springfox\springfox-swagger-common\2.9.2\springfox-swagger-common-2.9.2.jar;D:\server\maven\repository\io\springfox\springfox-spring-web\2.9.2\springfox-spring-web-2.9.2.jar;D:\server\maven\repository\org\springframework\plugin\spring-plugin-core\1.2.0.RELEASE\spring-plugin-core-1.2.0.RELEASE.jar;D:\server\maven\repository\org\springframework\plugin\spring-plugin-metadata\1.2.0.RELEASE\spring-plugin-metadata-1.2.0.RELEASE.jar;D:\server\maven\repository\org\mapstruct\mapstruct\1.2.0.Final\mapstruct-1.2.0.Final.jar;D:\server\maven\repository\com\github\xiaoymin\swagger-bootstrap-ui\1.9.6\swagger-bootstrap-ui-1.9.6.jar;D:\server\maven\repository\org\javassist\javassist\3.25.0-GA\javassist-3.25.0-GA.jar;D:\server\maven\repository\org\springframework\boot\spring-boot-starter-web\2.3.2.RELEASE\spring-boot-starter-web-2.3.2.RELEASE.jar;D:\server\maven\repository\org\springframework\boot\spring-boot-starter-json\2.3.2.RELEASE\spring-boot-starter-json-2.3.2.RELEASE.jar;D:\server\maven\repository\com\fasterxml\jackson\core\jackson-databind\2.11.1\jackson-databind-2.11.1.jar;D:\server\maven\repository\com\fasterxml\jackson\core\jackson-annotations\2.11.1\jackson-annotations-2.11.1.jar;D:\server\maven\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.11.1\jackson-datatype-jdk8-2.11.1.jar;D:\server\maven\repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.11.1\jackson-datatype-jsr310-2.11.1.jar;D:\server\maven\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.11.1\jackson-module-parameter-names-2.11.1.jar;D:\server\maven\repository\org\springframework\boot\spring-boot-starter-tomcat\2.3.2.RELEASE\spring-boot-starter-tomcat-2.3.2.RELEASE.jar;D:\server\maven\repository\org\apache\tomcat\embed\tomcat-embed-core\9.0.37\tomcat-embed-core-9.0.37.jar;D:\server\maven\repository\org\glassfish\jakarta.el\3.0.3\jakarta.el-3.0.3.jar;D:\server\maven\repository\org\apache\tomcat\embed\tomcat-embed-websocket\9.0.37\tomcat-embed-websocket-9.0.37.jar;D:\server\maven\repository\org\springframework\spring-webmvc\5.2.8.RELEASE\spring-webmvc-5.2.8.RELEASE.jar;D:\server\maven\repository\org\springframework\spring-expression\5.2.8.RELEASE\spring-expression-5.2.8.RELEASE.jar;D:\server\maven\repository\org\springframework\cloud\spring-cloud-starter-openfeign\2.2.4.RELEASE\spring-cloud-starter-openfeign-2.2.4.RELEASE.jar;D:\server\maven\repository\org\springframework\cloud\spring-cloud-starter\2.2.4.RELEASE\spring-cloud-starter-2.2.4.RELEASE.jar;D:\server\maven\repository\org\springframework\security\spring-security-rsa\1.0.9.RELEASE\spring-security-rsa-1.0.9.RELEASE.jar;D:\server\maven\repository\org\bouncycastle\bcpkix-jdk15on\1.64\bcpkix-jdk15on-1.64.jar;D:\server\maven\repository\org\springframework\cloud\spring-cloud-openfeign-core\2.2.4.RELEASE\spring-cloud-openfeign-core-2.2.4.RELEASE.jar;D:\server\maven\repository\org\springframework\cloud\spring-cloud-netflix-ribbon\2.2.4.RELEASE\spring-cloud-netflix-ribbon-2.2.4.RELEASE.jar;D:\server\maven\repository\org\springframework\cloud\spring-cloud-netflix-archaius\2.2.4.RELEASE\spring-cloud-netflix-archaius-2.2.4.RELEASE.jar;D:\server\maven\repository\org\springframework\boot\spring-boot-starter-aop\2.3.2.RELEASE\spring-boot-starter-aop-2.3.2.RELEASE.jar;D:\server\maven\repository\org\aspectj\aspectjweaver\1.9.6\aspectjweaver-1.9.6.jar;D:\server\maven\repository\io\github\openfeign\form\feign-form-spring\3.8.0\feign-form-spring-3.8.0.jar;D:\server\maven\repository\io\github\openfeign\form\feign-form\3.8.0\feign-form-3.8.0.jar;D:\server\maven\repository\commons-fileupload\commons-fileupload\1.4\commons-fileupload-1.4.jar;D:\server\maven\repository\org\springframework\cloud\spring-cloud-commons\2.2.4.RELEASE\spring-cloud-commons-2.2.4.RELEASE.jar;D:\server\maven\repository\org\springframework\security\spring-security-crypto\5.3.3.RELEASE\spring-security-crypto-5.3.3.RELEASE.jar;D:\server\maven\repository\io\github\openfeign\feign-core\10.10.1\feign-core-10.10.1.jar;D:\server\maven\repository\io\github\openfeign\feign-slf4j\10.10.1\feign-slf4j-10.10.1.jar;D:\server\maven\repository\io\github\openfeign\feign-hystrix\10.10.1\feign-hystrix-10.10.1.jar;D:\server\maven\repository\com\netflix\archaius\archaius-core\0.7.6\archaius-core-0.7.6.jar;D:\server\maven\repository\com\google\code\findbugs\jsr305\3.0.1\jsr305-3.0.1.jar;D:\server\maven\repository\commons-configuration\commons-configuration\1.8\commons-configuration-1.8.jar;D:\server\maven\repository\com\netflix\hystrix\hystrix-core\1.5.18\hystrix-core-1.5.18.jar;D:\server\maven\repository\org\hdrhistogram\HdrHistogram\2.1.9\HdrHistogram-2.1.9.jar;D:\server\maven\repository\net\bytebuddy\byte-buddy\1.10.13\byte-buddy-1.10.13.jar;D:\server\maven\repository\org\springframework\spring-core\5.2.8.RELEASE\spring-core-5.2.8.RELEASE.jar;E:\JetBrains\Toolbox\apps\IDEA-U\ch-1\221.4165.146\lib\idea_rt.jar cn.miozus.gulimall.order.GulimallOrderApplication
Connected to the target VM, address: '127.0.0.1:59223', transport: 'socket'
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.3.2.RELEASE)
2022-02-19 10:25:35.069 INFO 13104 --- [ main] c.a.n.c.c.impl.LocalConfigInfoProcessor : LOCAL_SNAPSHOT_PATH:C:\Users\miozus\nacos\config
2022-02-19 10:25:35.089 INFO 13104 --- [ main] c.a.nacos.client.config.impl.Limiter : limitTime:5.0
2022-02-19 10:25:35.200 INFO 13104 --- [ main] c.a.nacos.client.config.utils.JvmUtil : isMultiInstance:false
2022-02-19 10:25:35.674 WARN 13104 --- [ main] c.a.c.n.c.NacosPropertySourceBuilder : Ignore the empty nacos configuration and get it based on dataId[gulimall-order] & group[DEFAULT_GROUP]
2022-02-19 10:25:35.706 WARN 13104 --- [ main] c.a.c.n.c.NacosPropertySourceBuilder : Ignore the empty nacos configuration and get it based on dataId[gulimall-order.properties] & group[DEFAULT_GROUP]
2022-02-19 10:25:35.707 INFO 13104 --- [ main] b.c.PropertySourceBootstrapConfiguration : Located property source: [BootstrapPropertySource {name='bootstrapProperties-gulimall-order.properties,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-gulimall-order,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-ydoc.yml,pro'}, BootstrapPropertySource {name='bootstrapProperties-cache.yml,pro'}, BootstrapPropertySource {name='bootstrapProperties-pay.yml,pro'}, BootstrapPropertySource {name='bootstrapProperties-feign.yml,pro'}, BootstrapPropertySource {name='bootstrapProperties-redis.yml,pro'}, BootstrapPropertySource {name='bootstrapProperties-threadpool.yml,pro'}, BootstrapPropertySource {name='bootstrapProperties-rabbitmq.yml,pro'}, BootstrapPropertySource {name='bootstrapProperties-other.yml,pro'}, BootstrapPropertySource {name='bootstrapProperties-mybatis.yml,pro'}, BootstrapPropertySource {name='bootstrapProperties-datasource.yml,pro'}]
2022-02-19 10:25:35.734 INFO 13104 --- [ main] c.m.g.order.GulimallOrderApplication : No active profile set, falling back to default profiles: default
2022-02-19 10:25:36.202 INFO 13104 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!
2022-02-19 10:25:36.204 INFO 13104 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode.
2022-02-19 10:25:36.220 INFO 13104 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 9ms. Found 0 Redis repository interfaces.
2022-02-19 10:25:36.383 INFO 13104 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=bed9f933-1953-3f2b-a74e-16adf5f487bc
2022-02-19 10:25:36.820 INFO 13104 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2022-02-19 10:25:36.827 INFO 13104 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2022-02-19 10:25:36.827 INFO 13104 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.37]
2022-02-19 10:25:36.910 INFO 13104 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2022-02-19 10:25:36.910 INFO 13104 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1158 ms
_ _ |_ _ _|_. ___ _ | _
| | |\/|_)(_| | |_\ |_)||_|_\
/ |
3.3.1
2022-02-19 10:25:38.887 WARN 13104 --- [ main] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources.
2022-02-19 10:25:38.887 INFO 13104 --- [ main] c.n.c.sources.URLConfigurationSource : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2022-02-19 10:25:38.890 WARN 13104 --- [ main] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources.
2022-02-19 10:25:38.890 INFO 13104 --- [ main] c.n.c.sources.URLConfigurationSource : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2022-02-19 10:25:39.471 INFO 13104 --- [ main] o.s.s.c.ThreadPoolTaskScheduler : Initializing ExecutorService 'Nacos-Watch-Task-Scheduler'
_ _ ____ _____ ___
( \/ )( _ \( _ )/ __)
\ / )(_) ))(_)(( (__
(__) (____/(_____)\___)
v1.1.5
2022-02-19 10:51:43.076 WARN 13104 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'controllerSwagger' defined in class path resource [com/github/ydoc/config/AutoConfig.class]: Invocation of init method failed; nested exception is java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl cannot be cast to java.lang.Class
2022-02-19 10:51:43.077 WARN 13104 --- [ main] o.s.b.f.support.DisposableBeanAdapter : Destroy method 'close' on bean with name 'nacosServiceRegistry' threw an exception: java.lang.NullPointerException
2022-02-19 10:51:43.210 INFO 13104 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2022-02-19 10:51:43.220 INFO 13104 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-02-19 10:51:43.227 ERROR 13104 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'controllerSwagger' defined in class path resource [com/github/ydoc/config/AutoConfig.class]: Invocation of init method failed; nested exception is java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl cannot be cast to java.lang.Class
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1794) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879) ~[spring-context-5.2.8.RELEASE.jar:5.2.8.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551) ~[spring-context-5.2.8.RELEASE.jar:5.2.8.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143) ~[spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758) [spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750) [spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237) [spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]
at cn.miozus.gulimall.order.GulimallOrderApplication.main(GulimallOrderApplication.java:26) [classes/:na]
Caused by: java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl cannot be cast to java.lang.Class
at com.github.ydoc.core.Core.collectionProcess(Core.java:47) ~[ydoc-spring-boot-starter-1.1.5.jar:1.1.5]
at com.github.ydoc.core.Core.deepObject(Core.java:92) ~[ydoc-spring-boot-starter-1.1.5.jar:1.1.5]
at com.github.ydoc.core.strategy.IAbstractStrategy.deepObject(IAbstractStrategy.java:54) ~[ydoc-spring-boot-starter-1.1.5.jar:1.1.5]
at com.github.ydoc.core.strategy.IAbstractStrategy.baseResponse(IAbstractStrategy.java:155) ~[ydoc-spring-boot-starter-1.1.5.jar:1.1.5]
at com.github.ydoc.core.strategy.AbstractHandler.processResponse(AbstractHandler.java:37) ~[ydoc-spring-boot-starter-1.1.5.jar:1.1.5]
at com.github.ydoc.core.strategy.AbstractHandler.init(AbstractHandler.java:27) ~[ydoc-spring-boot-starter-1.1.5.jar:1.1.5]
at com.github.ydoc.core.handler.api.PostHandler.generateApi(PostHandler.java:17) ~[ydoc-spring-boot-starter-1.1.5.jar:1.1.5]
at com.github.ydoc.core.RequestTypeMatchingSwagger.matching(RequestTypeMatchingSwagger.java:45) ~[ydoc-spring-boot-starter-1.1.5.jar:1.1.5]
at com.github.ydoc.core.ScanControllerSwagger.scan(ScanControllerSwagger.java:105) ~[ydoc-spring-boot-starter-1.1.5.jar:1.1.5]
at com.github.ydoc.core.ScanControllerSwagger.afterPropertiesSet(ScanControllerSwagger.java:163) ~[ydoc-spring-boot-starter-1.1.5.jar:1.1.5]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1853) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1790) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
... 17 common frames omitted
2022-02-19 10:51:44.204 WARN 13104 --- [ Thread-2] c.a.n.common.http.HttpClientBeanHolder : [HttpClientBeanHolder] Start destroying common HttpClient
2022-02-19 10:51:44.205 WARN 13104 --- [ Thread-2] c.a.n.common.http.HttpClientBeanHolder : [HttpClientBeanHolder] Destruction of the end
Disconnected from the target VM, address: '127.0.0.1:59223', transport: 'socket'
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2021-12-10 20:43:07.611 ERROR 99056 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'controllerSwagger' defined in class path resource [com/github/ydoc/config/AutoConfig.class]: Invocation of init method failed; nested exception is java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.TypeVariableImpl cannot be cast to java.lang.Class at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1786) ~[spring-beans-5.3.6.jar:5.3.6] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:602) ~[spring-beans-5.3.6.jar:5.3.6] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:524) ~[spring-beans-5.3.6.jar:5.3.6] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.6.jar:5.3.6] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.6.jar:5.3.6] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.6.jar:5.3.6] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.6.jar:5.3.6] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:944) ~[spring-beans-5.3.6.jar:5.3.6] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) ~[spring-context-5.3.6.jar:5.3.6] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.6.jar:5.3.6] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:144) ~[spring-boot-2.4.5.jar:2.4.5] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:782) [spring-boot-2.4.5.jar:2.4.5] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:774) [spring-boot-2.4.5.jar:2.4.5] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:439) [spring-boot-2.4.5.jar:2.4.5] at org.springframework.boot.SpringApplication.run(SpringApplication.java:339) [spring-boot-2.4.5.jar:2.4.5] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1340) [spring-boot-2.4.5.jar:2.4.5] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1329) [spring-boot-2.4.5.jar:2.4.5] at com.cloud.tenmokucloud.DemoApplication.main(DemoApplication.java:12) [classes/:na] Caused by: java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.TypeVariableImpl cannot be cast to java.lang.Class at com.github.ydoc.core.RequestTypeMatchingSwagger.deepObject(RequestTypeMatchingSwagger.java:517) ~[ydoc-spring-boot-starter-1.1.3.jar:1.1.3] at com.github.ydoc.core.RequestTypeMatchingSwagger.returnBuild(RequestTypeMatchingSwagger.java:211) ~[ydoc-spring-boot-starter-1.1.3.jar:1.1.3] at com.github.ydoc.core.RequestTypeMatchingSwagger.post(RequestTypeMatchingSwagger.java:388) ~[ydoc-spring-boot-starter-1.1.3.jar:1.1.3] at com.github.ydoc.core.RequestTypeMatchingSwagger.matching(RequestTypeMatchingSwagger.java:47) ~[ydoc-spring-boot-starter-1.1.3.jar:1.1.3] at com.github.ydoc.core.ScanControllerSwagger.scan(ScanControllerSwagger.java:85) ~[ydoc-spring-boot-starter-1.1.3.jar:1.1.3] at com.github.ydoc.core.ScanControllerSwagger.afterPropertiesSet(ScanControllerSwagger.java:141) ~[ydoc-spring-boot-starter-1.1.3.jar:1.1.3] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1845) ~[spring-beans-5.3.6.jar:5.3.6] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1782) ~[spring-beans-5.3.6.jar:5.3.6] ... 17 common frames omitted
下面是我的 pom 文件
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">