SprinfBoot报警告WARNING: An illegal reflective access operation has occurred

2019-10-27 22:42:30

这个警告一般是java版本过高引起的,改低点就好了。

比如最近入手mac,没有安装java环境,忘记了。

直接运行的intellij,完全没有问题,当运行项目的时候就各种报错 

后来发现idea竟然自带了java11,哎这是谁给他的权利,这不坑我吗。哎。

然后配置了mac的java8环境,在给idea配置了java8就完全解决了这个问题。

不如错误1

    

Error:(51, 13) java: 找不到符号

  符号:   变量 log

  位置: 类 com.wenna.dsp.support.jwt.JwtFilter


错误2

"/Applications/IntelliJ IDEA.app/Contents/jbr/Contents/Home/bin/java" -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:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=63820:/Applications/IntelliJ IDEA.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Users/destinycheng/Documents/work/wb_gaoxuan/wdzm2019/litemall-wx-api/target/classes:/Applications/IntelliJ IDEA.app/Contents/bin/H:/maven/repository/org/springframework/boot/spring-boot-starter-mail/2.0.4.RELEASE/spring-boot-starter-mail-2.0.4.RELEASE.jar:/maven/repository/org/springframework/boot/spring-boot-starter/2.1.5.RELEASE/spring-boot-starter-2.1.5.RELEASE.jar:/maven/repository/org/springframework/boot/spring-boot-starter-logging/2.1.5.RELEASE/spring-boot-starter-logging-2.1.5.RELEASE.jar:/maven/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar:/maven/repository/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar:/maven/repository/org/apache/logging/log4j/log4j-to-slf4j/2.11.2/log4j-to-slf4j-2.11.2.jar:/maven/repository/org/apache/logging/log4j/log4j-api/2.11.2/log4j-api-2.11.2.jar:/maven/repository/org/slf4j/jul-to-slf4j/1.7.26/jul-to-slf4j-1.7.26.jar:/maven/repository/javax/annotation/javax.annotation-api/1.3.2/javax.annotation-api-1.3.2.jar:/maven/repository/org/yaml/snakeyaml/1.23/snakeyaml-1.23.jar:/maven/repository/org/springframework/spring-context/5.1.7.RELEASE/spring-context-5.1.7.RELEASE.jar:/maven/repository/org/springframework/spring-aop/5.1.7.RELEASE/spring-aop-5.1.7.RELEASE.jar:/maven/repository/org/springframework/spring-beans/5.1.7.RELEASE/spring-beans-5.1.7.RELEASE.jar:/maven/repository/org/springframework/spring-expression/5.1.7.RELEASE/spring-expression-5.1.7.RELEASE.jar:/maven/repository/org/springframework/spring-context-support/5.1.7.RELEASE/spring-context-support-5.1.7.RELEASE.jar:/maven/repository/com/sun/mail/javax.mail/1.6.2/javax.mail-1.6.2.jar:/maven/repository/javax/activation/activation/1.1/activation-1.1.jar:/Users/destinycheng/Documents/work/wb_gaoxuan/wdzm2019/litemall-core/target/classes:/maven/repository/org/hibernate/validator/hibernate-validator/6.0.15.Final/hibernate-validator-6.0.15.Final.jar:/maven/repository/javax/validation/validation-api/2.0.1.Final/validation-api-2.0.1.Final.jar:/maven/repository/org/jboss/logging/jboss-logging/3.3.2.Final/jboss-logging-3.3.2.Final.jar:/maven/repository/org/springframework/boot/spring-boot-starter-web/2.1.5.RELEASE/spring-boot-starter-web-2.1.5.RELEASE.jar:/maven/repository/org/springframework/boot/spring-boot-starter-tomcat/2.1.5.RELEASE/spring-boot-starter-tomcat-2.1.5.RELEASE.jar:/maven/repository/org/apache/tomcat/embed/tomcat-embed-core/9.0.19/tomcat-embed-core-9.0.19.jar:/maven/repository/org/apache/tomcat/embed/tomcat-embed-el/9.0.19/tomcat-embed-el-9.0.19.jar:/maven/repository/org/apache/tomcat/embed/tomcat-embed-websocket/9.0.19/tomcat-embed-websocket-9.0.19.jar:/maven/repository/org/springframework/spring-web/5.1.7.RELEASE/spring-web-5.1.7.RELEASE.jar:/maven/repository/org/springframework/spring-webmvc/5.1.7.RELEASE/spring-webmvc-5.1.7.RELEASE.jar:/maven/repository/org/springframework/boot/spring-boot-starter-json/2.0.4.RELEASE/spring-boot-starter-json-2.0.4.RELEASE.jar:/maven/repository/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.9.8/jackson-datatype-jdk8-2.9.8.jar:/maven/repository/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.9.8/jackson-datatype-jsr310-2.9.8.jar:/maven/repository/com/fasterxml/jackson/module/jackson-module-parameter-names/2.9.8/jackson-module-parameter-names-2.9.8.jar:/maven/repository/com/github/qcloudsms/qcloudsms/1.0.5/qcloudsms-1.0.5.jar:/maven/repository/org/json/json/20170516/json-20170516.jar:/maven/repository/org/apache/httpcomponents/httpclient/4.5.8/httpclient-4.5.8.jar:/maven/repository/org/apache/httpcomponents/httpcore/4.4.11/httpcore-4.4.11.jar:/maven/repository/org/apache/httpcomponents/httpmime/4.5.8/httpmime-4.5.8.jar:/maven/repository/com/qcloud/cos_api/5.4.4/cos_api-5.4.4.jar:/maven/repository/joda-time/joda-time/2.10.2/joda-time-2.10.2.jar:/maven/repository/org/bouncycastle/bcprov-jdk15on/1.59/bcprov-jdk15on-1.59.jar:/maven/repository/com/aliyun/oss/aliyun-sdk-oss/2.5.0/aliyun-sdk-oss-2.5.0.jar:/maven/repository/org/jdom/jdom/1.1/jdom-1.1.jar:/maven/repository/net/sf/json-lib/json-lib/2.4/json-lib-2.4-jdk15.jar:/maven/repository/net/sf/ezmorph/ezmorph/1.0.6/ezmorph-1.0.6.jar:/maven/repository/com/qiniu/qiniu-java-sdk/7.2.27/qiniu-java-sdk-7.2.27.jar:/maven/repository/com/squareup/okhttp3/okhttp/3.14.4/okhttp-3.14.4.jar:/maven/repository/com/squareup/okio/okio/1.17.2/okio-1.17.2.jar:/maven/repository/com/google/code/gson/gson/2.8.5/gson-2.8.5.jar:/Users/destinycheng/Documents/work/wb_gaoxuan/wdzm2019/litemall-db/target/classes:/maven/repository/org/mybatis/spring/boot/mybatis-spring-boot-starter/1.3.2/mybatis-spring-boot-starter-1.3.2.jar:/maven/repository/org/springframework/boot/spring-boot-starter-jdbc/2.1.5.RELEASE/spring-boot-starter-jdbc-2.1.5.RELEASE.jar:/maven/repository/com/zaxxer/HikariCP/3.2.0/HikariCP-3.2.0.jar:/maven/repository/org/springframework/spring-jdbc/5.1.7.RELEASE/spring-jdbc-5.1.7.RELEASE.jar:/maven/repository/org/springframework/spring-tx/5.1.7.RELEASE/spring-tx-5.1.7.RELEASE.jar:/maven/repository/org/mybatis/spring/boot/mybatis-spring-boot-autoconfigure/1.3.2/mybatis-spring-boot-autoconfigure-1.3.2.jar:/maven/repository/org/mybatis/mybatis/3.4.6/mybatis-3.4.6.jar:/maven/repository/org/mybatis/mybatis-spring/1.3.2/mybatis-spring-1.3.2.jar:/maven/repository/com/github/pagehelper/pagehelper-spring-boot-starter/1.2.5/pagehelper-spring-boot-starter-1.2.5.jar:/maven/repository/com/github/pagehelper/pagehelper-spring-boot-autoconfigure/1.2.5/pagehelper-spring-boot-autoconfigure-1.2.5.jar:/maven/repository/com/github/pagehelper/pagehelper/5.1.4/pagehelper-5.1.4.jar:/maven/repository/com/github/jsqlparser/jsqlparser/1.0/jsqlparser-1.0.jar:/maven/repository/mysql/mysql-connector-java/5.1.46/mysql-connector-java-5.1.46.jar:/maven/repository/com/alibaba/druid-spring-boot-starter/1.1.10/druid-spring-boot-starter-1.1.10.jar:/maven/repository/com/alibaba/druid/1.1.10/druid-1.1.10.jar:/maven/repository/org/projectlombok/lombok/1.18.8/lombok-1.18.8.jar:/maven/repository/com/github/binarywang/weixin-java-pay/3.3.0/weixin-java-pay-3.3.0.jar:/maven/repository/com/github/binarywang/weixin-java-common/3.3.0/weixin-java-common-3.3.0.jar:/maven/repository/com/thoughtworks/xstream/xstream/1.4.10/xstream-1.4.10.jar:/maven/repository/xmlpull/xmlpull/1.1.3.1/xmlpull-1.1.3.1.jar:/maven/repository/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.jar:/maven/repository/org/slf4j/jcl-over-slf4j/1.7.26/jcl-over-slf4j-1.7.26.jar:/maven/repository/commons-io/commons-io/2.5/commons-io-2.5.jar:/maven/repository/org/dom4j/dom4j/2.0.0/dom4j-2.0.0.jar:/maven/repository/jaxen/jaxen/1.1.6/jaxen-1.1.6.jar:/maven/repository/org/jodd/jodd-http/3.7.1/jodd-http-3.7.1.jar:/maven/repository/org/jodd/jodd-core/3.7.1/jodd-core-3.7.1.jar:/maven/repository/org/jodd/jodd-upload/3.7.1/jodd-upload-3.7.1.jar:/maven/repository/org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1.jar:/maven/repository/commons-beanutils/commons-beanutils/1.9.3/commons-beanutils-1.9.3.jar:/maven/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar:/maven/repository/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar:/maven/repository/org/bouncycastle/bcpkix-jdk15on/1.59/bcpkix-jdk15on-1.59.jar:/maven/repository/com/github/binarywang/weixin-java-miniapp/3.3.0/weixin-java-miniapp-3.3.0.jar:/maven/repository/io/springfox/springfox-swagger-ui/2.2.2/springfox-swagger-ui-2.2.2.jar:/maven/repository/io/springfox/springfox-spring-web/2.2.2/springfox-spring-web-2.2.2.jar:/maven/repository/io/springfox/springfox-swagger2/2.2.2/springfox-swagger2-2.2.2.jar:/maven/repository/org/mapstruct/mapstruct/1.0.0.CR1/mapstruct-1.0.0.CR1.jar:/maven/repository/io/swagger/swagger-annotations/1.5.3/swagger-annotations-1.5.3.jar:/maven/repository/io/swagger/swagger-models/1.5.3/swagger-models-1.5.3.jar:/maven/repository/com/fasterxml/jackson/core/jackson-annotations/2.9.0/jackson-annotations-2.9.0.jar:/maven/repository/io/springfox/springfox-spi/2.2.2/springfox-spi-2.2.2.jar:/maven/repository/io/springfox/springfox-core/2.2.2/springfox-core-2.2.2.jar:/maven/repository/io/springfox/springfox-schema/2.2.2/springfox-schema-2.2.2.jar:/maven/repository/io/springfox/springfox-swagger-common/2.2.2/springfox-swagger-common-2.2.2.jar:/maven/repository/com/google/guava/guava/18.0/guava-18.0.jar:/maven/repository/com/fasterxml/classmate/1.4.0/classmate-1.4.0.jar:/maven/repository/org/slf4j/slf4j-api/1.7.26/slf4j-api-1.7.26.jar:/maven/repository/org/aspectj/aspectjrt/1.9.4/aspectjrt-1.9.4.jar:/maven/repository/org/aspectj/aspectjweaver/1.9.4/aspectjweaver-1.9.4.jar:/maven/repository/org/springframework/plugin/spring-plugin-core/1.2.0.RELEASE/spring-plugin-core-1.2.0.RELEASE.jar:/maven/repository/org/springframework/plugin/spring-plugin-metadata/1.2.0.RELEASE/spring-plugin-metadata-1.2.0.RELEASE.jar:/maven/repository/org/springframework/hateoas/spring-hateoas/0.25.1.RELEASE/spring-hateoas-0.25.1.RELEASE.jar:/maven/repository/com/auth0/java-jwt/3.4.1/java-jwt-3.4.1.jar:/maven/repository/com/fasterxml/jackson/core/jackson-databind/2.9.8/jackson-databind-2.9.8.jar:/maven/repository/com/fasterxml/jackson/core/jackson-core/2.9.8/jackson-core-2.9.8.jar:/maven/repository/commons-codec/commons-codec/1.11/commons-codec-1.11.jar:/maven/repository/org/springframework/boot/spring-boot-devtools/2.1.5.RELEASE/spring-boot-devtools-2.1.5.RELEASE.jar:/maven/repository/org/springframework/boot/spring-boot/2.1.5.RELEASE/spring-boot-2.1.5.RELEASE.jar:/maven/repository/org/springframework/boot/spring-boot-autoconfigure/2.1.5.RELEASE/spring-boot-autoconfigure-2.1.5.RELEASE.jar:/maven/repository/junit/junit/4.12/junit-4.12.jar:/maven/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/maven/repository/org/springframework/spring-core/5.1.7.RELEASE/spring-core-5.1.7.RELEASE.jar:/maven/repository/org/springframework/spring-jcl/5.1.7.RELEASE/spring-jcl-5.1.7.RELEASE.jar:/maven/repository/cn/hutool/hutool-all/4.6.7/hutool-all-4.6.7.jar:/maven/repository/org/springframework/boot/spring-boot-starter-cache/2.1.5.RELEASE/spring-boot-starter-cache-2.1.5.RELEASE.jar:/maven/repository/net/sf/ehcache/ehcache/2.10.6/ehcache-2.10.6.jar:/maven/repository/com/alibaba/fastjson/1.2.7/fastjson-1.2.7.jar:/maven/repository/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3.50/kotlin-stdlib-jdk8-1.3.50.jar:/maven/repository/org/jetbrains/kotlin/kotlin-stdlib/1.3.50/kotlin-stdlib-1.3.50.jar:/maven/repository/org/jetbrains/kotlin/kotlin-stdlib-common/1.3.50/kotlin-stdlib-common-1.3.50.jar:/maven/repository/org/jetbrains/annotations/13.0/annotations-13.0.jar:/maven/repository/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.3.50/kotlin-stdlib-jdk7-1.3.50.jar" org.linlinjava.litemall.wx.Application
Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/boot/SpringApplication
 at org.linlinjava.litemall.wx.Application.main(Application.java:16)
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.SpringApplication
 at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
 at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
 at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
 ... 1 more

Process finished with exit code 1

警告

    WARNING: An illegal reflective access operation has occurred



     

  • 2021-04-15 10:10:00

    Puppeteer 系列踩坑日志—3—开启支持插件

    在使用puppeteer自动化的过程中,会发现其实开启的chrome往往自动禁用了插件功能,如果我们想在自动化测试的过程中,再去使用一些常用的插件提升效率(偷懒)的话,就行不通了,其实解决办法还是有的,我们今天就来讲解这个问题。

  • 2021-04-15 10:11:17

    Puppeteer拦截修改返回值

    page.setRequestInterception(true)拦截器的使用方法和场景 现附上Puppeteer的Api的链接https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md

  • 2021-04-15 10:32:18

    怎么给 headless chrome添加cookies

    In puppeter you have access to the session cookies through page.cookies(). So once you log in, you could get every cookie and save it in a json file:

  • 2021-04-15 10:51:21

    如何通过Devtools协议拦截和修改Chrome响应数据

    在日常研究中,我们经常碰到大量JavaScript代码,我们首先要深入分析才能了解这些代码的功能及具体逻辑。这些代码代码可能会被恶意注入到页面中,可能是客户送过来需要我们帮忙分析的脚本,也可能是我们的安全团队在网页上找到的引用了我们服务的某些资源。这些脚本通常代码量不大、经过混淆处理,并且我们总是需要经过多层修改才能继续深入分析。

  • 2021-04-19 10:54:39

    block和delegate的区别

    代理 可读性高 大部分可以属性 block 写的代码少 一般作为参数 通知 占用资源

  • 2021-04-19 11:00:23

    浅谈block和delegate的使用

    委托是协议的一种,顾名思义,就是委托他人帮自己去做事。委托是给一个对象提供机会对另一个对象中的变化做出反应或者影响另一个对象的行为。其基本思想是:两个对象协同解决问题,并且打算在广泛的情形中重用。委托指向另一个对象(即它的委托)的引用,并在关键时刻给委托发消息。消息可能只是通知委托发生了某件事情,给委托提供机会执行额外的处理,或者消息可能要求委托提供一些关键的信息以控制所发生的事情。委托的作用主要有两个,一个是传值,一个是传事件。

  • 2021-04-19 11:36:44

    iOS 组件实现方案

    什么才是好架构,为什么要组件,组件设计的优点