如题。
七牛官网有2个 一个SDK 还有个jar 两个链接。
研究半天2个也都下载下载下来了, 也终于吧Maven装好了。
现在SDK项目导入后可以跑 但是不是Web项目。而且真心不会 这个。
jar包的话直接放到JavaWeb项目下面 代码写都没问题 可是直接跑的话就报错
java.lang.ClassNotFoundException: org.apache.http.entity.StringEntity
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at com.qiniu.api.rsf.RSFClient.
at com.liuyx.qiniu.FileListServlet.doGet(FileListServlet.java:57)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
Maven的的SDK 怎么导入到JavaWeb 项目里呢? 求解。
Qiniu java-sdk uses maven as the package manager.
Currently, mainstream development tools are integrated with maven plug-ins.
When using Qiniu java-sdk or qiniu-java-sdk.jar, you need to import the dependencies of Qiniu java-sdk itself.
Specific dependencies are described in pom.xml.
The specific dependency packages are
httpcore-ab-4.2.1.jar
fluent-hc-4.2.jar
httpclient-cache-4.2.jar
httpcore-nio-4.2.1.jar
httpmime-4.2.jar
httpclient-4.2.jar
httpcore-4.2.1.jar
org.json-chargebee-1.0.jar
If you do not submit code to Qiniu, junit-3.8 can be ignored, because generally IDEs have their own junit version.
You can use maven management directly, or you can manually import related packages.