Giter Site home page Giter Site logo

springboot-weapp-demo's People

Contributors

nosqlcoco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

springboot-weapp-demo's Issues

Dependency Conflict: duplicate classes "org.apache.commons.logging.LogFactory.getFactory" in different JARs, have different implementations

Hi, in springboot-weapp-demo, duplicate classes with the same fully-qualified name org.apache.commons.logging.LogFactory.getFactory are included in two different libraries, i.e., commons-logging:commons-logging:1.2 and org.slf4j:jcl-over-slf4j:1.7.21.

According to "first declaration wins" class loading strategy, only this class in org.slf4j:jcl-over-slf4j:1.7.21 can be loaded, and that in commons-logging:commons-logging:1.2 will be shadowed.

By further analyzing, your project expects to invoke method org.apache.commons.logging.LogFactory.getFactory in commons-logging:commons-logging:1.2. As it has been shadowed, so that this method defined in org.slf4j:jcl-over-slf4j:1.7.21 are actually forced to be referenced via the following invocation path:

<com.weapp.Application: main([Ljava/lang/String;)V> /root/sensor/unzip/springboot-weapp-demo-master/target/classes
<org.springframework.boot.SpringApplication: <clinit>()V> /root/.m2/repository/org/springframework/boot/spring-boot/1.4.2.RELEASE/spring-boot-1.4.2.RELEASE.jar
<org.apache.commons.logging.LogFactory: getLog(Ljava/lang/Class;)Lorg/apache/commons/logging/Log;> /root/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar
<org.apache.commons.logging.LogFactory: getFactory()Lorg/apache/commons/logging/LogFactory;>

Workaround solution:
An easy way to workaround the problem is reversing the declaration order of these two libraries (i.e., reverse the declaration order of httpclient and maven-resolver-transport-http) in pom file.
Then, according to "first declaration wins" class loading strategy, class org.apache.commons.logging.LogFactory.getFactory in commons-logging:commons-logging:1.2 can be loaded (the version that springboot-weapp-demo expects to reference by static analysis).
This fix will not affect other libraries or class, except the above duplicate class.

Dependency tree---

[INFO] com.wxapp:wxapp:jar:1.0.0
[INFO] +- org.springframework.boot:spring-boot-starter:jar:1.4.2.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot:jar:1.4.2.RELEASE:compile
[INFO] | | - org.springframework:spring-context:jar:4.3.4.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-autoconfigure:jar:1.4.2.RELEASE:compile
[INFO] | +- org.springframework:spring-core:jar:4.3.4.RELEASE:compile
[INFO] | - org.yaml:snakeyaml:jar:1.17:runtime
[INFO] +- org.springframework.boot:spring-boot-starter-websocket:jar:1.4.2.RELEASE:compile
[INFO] | +- org.springframework:spring-messaging:jar:4.3.4.RELEASE:compile
[INFO] | | - org.springframework:spring-beans:jar:4.3.4.RELEASE:compile
[INFO] | - org.springframework:spring-websocket:jar:4.3.4.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-data-mongodb:jar:1.4.2.RELEASE:compile
[INFO] | +- org.mongodb:mongodb-driver:jar:3.2.2:compile
[INFO] | | +- org.mongodb:mongodb-driver-core:jar:3.2.2:compile
[INFO] | | - org.mongodb:bson:jar:3.2.2:compile
[INFO] | - org.springframework.data:spring-data-mongodb:jar:1.9.5.RELEASE:compile
[INFO] | +- org.springframework:spring-tx:jar:4.3.4.RELEASE:compile
[INFO] | +- org.springframework:spring-expression:jar:4.3.4.RELEASE:compile
[INFO] | +- org.springframework.data:spring-data-commons:jar:1.12.5.RELEASE:compile
[INFO] | - org.slf4j:jcl-over-slf4j:jar:1.7.21:runtime
......
[INFO] +- com.alibaba:fastjson:jar:1.2.31:compile
[INFO] +- org.projectlombok:lombok:jar:1.16.10:compile
[INFO] +- com.google.guava:guava:jar:19.0:compile
[INFO] +- commons-logging:commons-logging:jar:1.2:compile
......

Thank you very much.
Best,
Coco

AES解密那里报错

AES aes = new AES(); byte[] resultByte = aes.decrypt(encryptedData.getBytes(), Base64.decodeBase64(sessionKey), iv.getBytes()); if(null != resultByte && resultByte.length > 0){ String userInfo = new String(resultByte, "UTF-8"); System.out.println(userInfo); }

这里执行会报错,错误信息:java.security.NoSuchProviderException: No such provider: PKCS#7
我用的是JDK.1.8.20, 并使用jce_policy-8.zip修改了JDK下的策略文件(local_policy.jar,US_export_policy.jar)

一点建议

麻烦可以写下如何配置服务器程序的简单说明吗,尤其是redis和mongdb数据库的配置方面的东西。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.