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



     

  • 2019-05-21 12:43:26

    (重要)RecycleView的缓存机制

    RecycleView的四级缓存是由三个类共同作用完成的,Recycler、RecycledViewPool和ViewCacheExtension。Recycler用于管理已经废弃或者与RecyclerView分离的ViewHolder,这里面有两个重要的成员,为可以看见的屏幕的内部缓存成员mAttachedScrap、mChangedScrap和滑出屏幕外的外部缓存成员mCachedViews二者共同完成ViewHolder的缓存;RecycledViewPool类是用来缓存整体所有的ViewHolder,是对mCachedViews缓存的补充;ViewCacheExtension是扩展内的缓存对象,默认不加载,需实现方法getViewForPositionAndType(Recycler recycler, int position, int type)来实现自己的缓存。接下来对四级缓存一步步介绍。

  • 2019-05-21 12:44:31

    对嵌套RecyclerView的优化

    RecyclerView 是一个更高级的 ListView ,它可以重用view避免额外创建太多的view从而带来流畅的滚动性能。RecyclerView通过叫做 View pool 的东西持有不再可见的 view ,让它可被回收

  • 2019-05-25 14:54:50

    commit your changes or stash them before you can merge

    Your local changes to the following files would be overwritten by merge:         protected/config/main.php Please, commit your changes or stash them before you can merge. --------------------- 作者:陈小峰_iefreer 来源:CSDN 原文:https://blog.csdn.net/iefreer/article/details/7679631 版权声明:本文为博主原创文章,转载请附上博文链接!

  • 2019-05-27 10:43:34

    IntelliJ IDEA中C盘文件过大怎么办

    当我在D:\ 安装完IDEA9.0之后,建立了一个工程,发现C:\Users\Administrator\.IntelliJIdea90 竟然增大到了500+M,并且随着使用在逐渐增大,这样占用系统盘资源是非常让人不爽的,那么如何将其修改到其他路径呢?

  • 2019-05-28 13:33:20

    BRVAH+MTRVA,复杂?不存在的

    言归正传,这样的一个首页,我们需要做怎么样的基础工作呢?或者说,碰到以后更复杂的页面我们应该怎么做?这里小提示下,不要再用什么类似ScrollView的这种东西了,诶,好像说的有点绝对,尽量不要用,这不是谷歌想要看到的,5.0谷歌推出了RecyclerView,从它的整个设计架构来看,简直就是为这而生的。而RecyclerView的视图是通过Adapter来渲染的。原始的Adapter,让人很蛋疼,重复工作太多,我们应该要有封装的思想,把最需要的部分提供出来,其它不用管。

  • 2019-05-29 14:19:19

    解决Git中fatal: refusing to merge unrelated histories

    Git的报错 在使用Git的过程中有时会出现一些问题,那么在解决了每个问题的时候,都需要去总结记录下来,下次不再犯。 一、fatal: refusing to merge unrelated histories 今天在使用Git创建项目的时候,在两个分支合并的时候,出现了下面的这个错误。

  • 2019-05-29 15:47:51

    撤销commit

    在git push的时候,有时候我们会想办法撤销git commit的内容