Intellij idea中创建java maven项目引用包出错

图片说明

如图所示 提示connot resolve symbol 'XXXX'
请各位帮忙指点

7个回答

选择文件重新导入一下引用的包,或者重新用maven编译一下,
用cmd 窗口
进入pom.xml的根目录下
执行
mvn -DskipTests=true clean install(这个需要你自己在环境变量中配置maven的路径)。

maven最好用3.x以上版本的,在 settings 中检查或设置 maven的相关配置,如maven_home_directory、user settings file、local repository等;
退出idea,进出项目根目录,删除.idea目录及目录下所有文件;
重启idea,Reimport。
这样试试看

monkingwu
monkingwu 搞了一天,你这种办法解决了。感谢,灰常感谢!再问一下,这是什么原理呢?
一年多之前 回复

没配置好包,或者包没下下来或者版本不对

jar包没有依赖进来,reimport

保留项目的基本信息(代码+pom.xml),剩下的删除,Idea重新引入项目(引用时点击到pom.xml文件),一般可以解决问题

一般是引用的包下载的问题,如果由于网络或者镜像仓库配置的原因可能会导致maven拉取的jar包不完整,这时到maven仓库查看的话是并没有jar包的,
文件后缀如果为.lastupdated文件表明jar包并未下载完整,可以将maven仓库中未下载完整的文件删除,刷新项目重新拉取jar包。

请问你怎么解决的,我的也是一样的问题,但是项目可以正常运行

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
IDEA 的maven出错 Unable to import maven project
maven也自己下了,配置也都照着网上配了,环境变量什么的都弄了,IDEA的maven也照着网上配了 这是错误日志 java.lang.RuntimeException: Cannot reconnect. at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:82) at org.jetbrains.idea.maven.server.MavenServerManager.applyProfiles(MavenServerManager.java:550) at org.jetbrains.idea.maven.project.MavenProjectReader.applyProfiles(MavenProjectReader.java:397) at org.jetbrains.idea.maven.project.MavenProjectReader.doReadProjectModel(MavenProjectReader.java:103) at org.jetbrains.idea.maven.project.MavenProjectReader.readProject(MavenProjectReader.java:62) at org.jetbrains.idea.maven.project.MavenProject.read(MavenProject.java:639) at org.jetbrains.idea.maven.project.MavenProjectsTree.doUpdate(MavenProjectsTree.java:554) at org.jetbrains.idea.maven.project.MavenProjectsTree.doAdd(MavenProjectsTree.java:499) at org.jetbrains.idea.maven.project.MavenProjectsTree.update(MavenProjectsTree.java:460) at org.jetbrains.idea.maven.project.MavenProjectsTree.updateAll(MavenProjectsTree.java:431) at org.jetbrains.idea.maven.project.MavenProjectsProcessorReadingTask.perform(MavenProjectsProcessorReadingTask.java:60) at org.jetbrains.idea.maven.project.MavenProjectsProcessor.doProcessPendingTasks(MavenProjectsProcessor.java:132) at org.jetbrains.idea.maven.project.MavenProjectsProcessor.access$000(MavenProjectsProcessor.java:32) at org.jetbrains.idea.maven.project.MavenProjectsProcessor$2.run(MavenProjectsProcessor.java:107) at org.jetbrains.idea.maven.utils.MavenUtil.lambda$runInBackground$5(MavenUtil.java:460) at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:330) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.rmi.RemoteException: Cannot start maven service; nested exception is: com.intellij.execution.ExecutionException: at org.jetbrains.idea.maven.server.MavenServerManager.create(MavenServerManager.java:175) at org.jetbrains.idea.maven.server.MavenServerManager.create(MavenServerManager.java:80) at org.jetbrains.idea.maven.server.RemoteObjectWrapper.getOrCreateWrappee(RemoteObjectWrapper.java:41) at org.jetbrains.idea.maven.server.MavenServerManager$7.execute(MavenServerManager.java:553) at org.jetbrains.idea.maven.server.MavenServerManager$7.execute(MavenServerManager.java:550) at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:76) ... 20 more Caused by: com.intellij.execution.ExecutionException: at com.intellij.execution.rmi.RemoteProcessSupport.acquire(RemoteProcessSupport.java:166) at org.jetbrains.idea.maven.server.MavenServerManager.create(MavenServerManager.java:172) ... 25 more 2017-10-27 13:52:43,319 [ 628599] ERROR - #org.jetbrains.idea.maven - IntelliJ IDEA 2017.2.5 Build #IU-172.4343.14 2017-10-27 13:52:43,319 [ 628599] ERROR - #org.jetbrains.idea.maven - JDK: 1.8.0_152-release 2017-10-27 13:52:43,319 [ 628599] ERROR - #org.jetbrains.idea.maven - VM: OpenJDK 64-Bit Server VM 2017-10-27 13:52:43,319 [ 628599] ERROR - #org.jetbrains.idea.maven - Vendor: JetBrains s.r.o 2017-10-27 13:52:43,319 [ 628599] ERROR - #org.jetbrains.idea.maven - OS: Windows 10 2017-10-27 13:52:43,319 [ 628599] ERROR - #org.jetbrains.idea.maven - Last Action: ShowSettings
IDEA创建Maven项目Build报错,Plugins处爆红.Run处也出错.
![图片说明](https://img-ask.csdn.net/upload/201911/03/1572762368_418000.png)![图片说明](https://img-ask.csdn.net/upload/201911/03/1572762376_502146.png)![图片说明](https://img-ask.csdn.net/upload/201911/03/1572762383_129513.png) ![图片说明](https://img-ask.csdn.net/upload/201911/03/1572762562_476934.png)![图片说明](https://img-ask.csdn.net/upload/201911/03/1572762567_105839.png) 在网上找的解决方案也没有用,本地maven的配置文件和仓库地址也一致。 难道是我用手机热点的问题?手机是联通的. 有没有大佬帮忙看下..实在不知道是哪里出了问题.
maven打包的springboot项目运行出错
mvn package无错误 java -jar target/eureka-server.jar ``` Exception in thread "main" java.lang.IllegalAccessException: Class org.springframework.boot.loader.MainMethodRunner can not access a member of class cn.com.smartning.cloudproject.eurekaserver.EurekaServerApplication with modifiers "public static" at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:102) at java.lang.reflect.AccessibleObject.slowCheckMemberAccess(AccessibleObject.java:296) at java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:288) at java.lang.reflect.Method.invoke(Method.java:491) at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) ```
git add的时候出错,是什么原因?改怎样解决?
The following problems have occurred when adding the files: The following paths are ignored by one of your .gitignore files: .idea Use -f if you really want to add them. during executing git "C:\Program Files\Git\cmd\git.exe" -c core.quotepath=false add --ignore-errors -- profiles/profile-prd.properties .idea/libraries/Maven__org_mybatis_mybatis_spring_1_2_4.xml .idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_5_1.xml .idea/libraries/Maven__com_google_guava_guava_18_0.xml rest-client/src/main/java/com/core/ws/client/domain/Item.java .idea/libraries/Maven__com_mchange_mchange_commons_java_0_2_9.xml .idea/libraries/Maven__com_mchange_c3p0_0_9_5.xml .idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml .idea/libraries/Maven__org_beanshell_bsh_2_0b4.xml .idea/libraries/Maven__commons_codec_commons_codec_1_10.xml .idea/vcs.xml .idea/encodings.xml .idea/compiler.xml rest-client/src/test/Java/com/core/ws/lient/ItemApiTest.java .idea/libraries/Maven__postgresql_postgresql_9_1_901_jdbc4.xml .idea/libraries/Maven__org_testng_testng_6_9_10.xml .idea/libraries/Maven__org_mybatis_mybatis_3_3_1.xml .idea/libraries/Maven__junit_junit_4_12.xml .idea/libraries/Maven__com_beust_jcommander_1_48.xml .idea/modules.xml .idea/misc.xml data-storage/src/main/resources/application.properties ![图片说明](https://img-ask.csdn.net/upload/201703/03/1488532208_254495.jpg)
springboot项目创建entityManagerFactory时出错:Error activating Bean Validation integration,如何解决?
在svn上拉下项目来本地时无法开启项目,包和配置都和别人一样,但是别人能启动,项目是springboot2.1.9+JPA+mybatis-plus+mysql+oracle+application.properties 所有配置都写到了application.propertiese中 麻烦熟悉JPA的entityManagerFactory生命周期的大神们帮忙解决下,感激不 尽。 鄙人已尝试过的操作: * 1检查实体类与数据库的字段是否匹配,换springboot的版本。 * 2 重新倒jar包、挂上@Entity @ID @GeneratedValue 、重写get set方法、import javax.persistence.Id。 * 3倒入各种hibernate相关的包和javassist包,换mave版本,重新开maven库单独下载包 具体错误如下 ``` org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.cfg.beanvalidation.IntegrationException: Error activating Bean Validation integration at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1778) ~[spring-beans-5.1.10.RELEASE.jar:5.1.10.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593) ~[spring-beans-5.1.10.RELEASE.jar:5.1.10.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.10.RELEASE.jar:5.1.10.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.10.RELEASE.jar:5.1.10.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.10.RELEASE.jar:5.1.10.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.10.RELEASE.jar:5.1.10.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.10.RELEASE.jar:5.1.10.RELEASE] at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1105) ~[spring-context-5.1.10.RELEASE.jar:5.1.10.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867) ~[spring-context-5.1.10.RELEASE.jar:5.1.10.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549) ~[spring-context-5.1.10.RELEASE.jar:5.1.10.RELEASE] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.1.9.RELEASE.jar:2.1.9.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:744) [spring-boot-2.1.9.RELEASE.jar:2.1.9.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:391) [spring-boot-2.1.9.RELEASE.jar:2.1.9.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) [spring-boot-2.1.9.RELEASE.jar:2.1.9.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.1.9.RELEASE.jar:2.1.9.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1204) [spring-boot-2.1.9.RELEASE.jar:2.1.9.RELEASE] at com.south.robot.RobotApplication.main(RobotApplication.java:13) [classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_161] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_161] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_161] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_161] at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) [spring-boot-devtools-2.1.9.RELEASE.jar:2.1.9.RELEASE] ```
这是spring注入失败的提示吧??
**新手在学ssm,整合的时候发现好像死活都注入不了 但是我注释也扫了,也加了@注释 jdk1.8** **下面的tomcat(9.0.16)的运行日志** 18-Mar-2020 01:22:49.871 淇℃伅 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.servlet.FrameworkServlet.initServletBean Initializing Servlet 'dispatcherServlet' 18-Mar-2020 01:22:50.984 璀﹀憡 [RMI TCP Connection(3)-127.0.0.1] org.springframework.context.support.AbstractApplicationContext.refresh Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'accountController': Unsatisfied dependency expressed through field 'accountService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'accountService': Unsatisfied dependency expressed through field 'AccountDao'; n**ested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'all.dao.AccountDao' available: expected at least 1 bean which qualifies as autowire candidate. **Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)} # ```下面是代码 ``` package all.service.impl; import all.dao.AccountDao; import all.domain.Account; import all.service.AccountService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; @Service("accountService") public class AccountServiceImpl implements AccountService { @Autowired private AccountDao accountDao; public void setAccountDao(AccountDao accountDao) { this.accountDao = accountDao; } @Override public List<Account> findAll() { return accountDao.findAll(); } @Override public void save() { Account account = new Account(); accountDao.save(account); } } ```package all.controller; import all.domain.Account; import all.service.AccountService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import java.util.List; @Controller @RequestMapping("/account") public class AccountController { @Autowired private AccountService accountService; public void setAccountService(AccountService accountService) { this.accountService = accountService; } @RequestMapping("/findAll") public String findAll(Model model){ List<Account> accounts = accountService.findAll(); model.addAttribute("accounts",accounts); return "success"; } @RequestMapping("/save") public void save(Account account){ accountService.save(); } } package all.dao; import all.domain.Account; import org.apache.ibatis.annotations.Insert; import org.apache.ibatis.annotations.Select; import org.springframework.stereotype.Repository; import java.util.List; @Repository public interface AccountDao { @Select("select * from account") public List<Account> findAll(); @Insert("insert into account (name,money) values(#{name},#{money})") public void save(Account account); } ``` ## 经过我的测试,accountService不注入accountDao就不会出错,而accountDao单独配合Mybatis运行也没有问题,所以应该是spring整合mybatis那里出错了,但是我不知道具体是哪里出错了,希望各位大佬能帮我看一下。。 ## ``` ## ## ``` ## 现在把applicationContext.xml文件贴出来给你们看看 ## ``` <!-- spring整合mybatis框架--> <!-- 配置连接池--> <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"> <property name="driverClass" value="com.mysql.jdbc.Driver"/> <property name="jdbcUrl" value="jdbc:mysql:///ssm?serverTimezone=UTC"/> <property name="user" value="root"/> <property name="password" value="0759"/> </bean> <!--配置工厂 --> <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"> <property name="dataSource" ref="dataSource"/> </bean> <!-- 配置接口所在的包 --> <bean id="mapperScanner" class="org.mybatis.spring.mapper.MapperScannerConfigurer"> <property name="basePackage" value="all.dao"></property> </bean> ```
使用IDEA和maven做注册时候遇到如下问题:
"E:\IntelliJ IDEA 2016.2.1\jdk1.8.0_91\bin\java" "-Dmaven.home=E:\IntelliJ IDEA 2016.2.1\plugins\maven\lib\maven3" "-Dclassworlds.conf=E:\IntelliJ IDEA 2016.2.1\plugins\maven\lib\maven3\bin\m2.conf" -Didea.launcher.port=7533 "-Didea.launcher.bin.path=E:\IntelliJ IDEA 2016.2.1\bin" -Dfile.encoding=UTF-8 -classpath "E:\IntelliJ IDEA 2016.2.1\plugins\maven\lib\maven3\boot\plexus-classworlds-2.4.jar;E:\IntelliJ IDEA 2016.2.1\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher -Didea.version=2016.2.1 tomcat:run [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building zhuce Maven Webapp 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] >>> tomcat-maven-plugin:1.1:run (default-cli) @ zhuce >>> [WARNING] The POM for com.google.guava:guava:jar:15.0 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] The POM for javax.servlet:javax.servlet-api:jar:3.1.0 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] The POM for org.glassfish.jersey.containers:jersey-container-grizzly2-servlet:jar:2.13 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] The POM for org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.13 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] The POM for commons-io:commons-io:jar:2.4 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] The POM for org.glassfish.jersey.core:jersey-client:jar:2.13 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] The POM for org.apache.bval:bval-jsr303:jar:0.5 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] The POM for log4j:log4j:jar:1.2.14 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] The POM for org.apache.httpcomponents:httpclient:jar:4.1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] The POM for com.tustcs.java:base:jar:1.0 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] The POM for org.json:json:jar:20140107 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [INFO] [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ zhuce --- [debug] execute contextualize [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ zhuce --- [WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent! [INFO] Compiling 2 source files to F:\zhuce\target\classes [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] Failure executing javac, but could not parse the error: 错误: 读取C:\Users\ZILI\.m2\repository\com\google\guava\guava\15.0\guava-15.0.jar时出错; error in opening zip file 错误: 读取C:\Users\ZILI\.m2\repository\javax\servlet\javax.servlet-api\3.1.0\javax.servlet-api-3.1.0.jar时出错; error in opening zip file 错误: 读取C:\Users\ZILI\.m2\repository\org\glassfish\jersey\containers\jersey-container-grizzly2-servlet\2.13\jersey-container-grizzly2-servlet-2.13.jar时出错; error in opening zip file 错误: 读取C:\Users\ZILI\.m2\repository\org\glassfish\jersey\containers\jersey-container-servlet-core\2.13\jersey-container-servlet-core-2.13.jar时出错; error in opening zip file 错误: 读取C:\Users\ZILI\.m2\repository\commons-io\commons-io\2.4\commons-io-2.4.jar时出错; error in opening zip file 错误: 读取C:\Users\ZILI\.m2\repository\org\glassfish\jersey\core\jersey-client\2.13\jersey-client-2.13.jar时出错; error in opening zip file 错误: 读取C:\Users\ZILI\.m2\repository\org\apache\bval\bval-jsr303\0.5\bval-jsr303-0.5.jar时出错; error in opening zip file 错误: 读取C:\Users\ZILI\.m2\repository\log4j\log4j\1.2.14\log4j-1.2.14.jar时出错; error in opening zip file 错误: 读取C:\Users\ZILI\.m2\repository\org\apache\httpcomponents\httpclient\4.1\httpclient-4.1.jar时出错; error in opening zip file 错误: 读取C:\Users\ZILI\.m2\repository\com\tustcs\java\base\1.0\base-1.0.jar时出错; error in opening zip file 错误: 读取C:\Users\ZILI\.m2\repository\org\json\json\20140107\json-20140107.jar时出错; error in opening zip file 11 个错误 [INFO] 1 error [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 13.436s [INFO] Finished at: Mon Oct 10 10:44:37 CST 2016 [INFO] Final Memory: 10M/77M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project zhuce: Compilation failure [ERROR] Failure executing javac, but could not parse the error: [ERROR] 错误: 读取C:\Users\ZILI\.m2\repository\com\google\guava\guava\15.0\guava-15.0.jar时出错; error in opening zip file [ERROR] 错误: 读取C:\Users\ZILI\.m2\repository\javax\servlet\javax.servlet-api\3.1.0\javax.servlet-api-3.1.0.jar时出错; error in opening zip file [ERROR] 错误: 读取C:\Users\ZILI\.m2\repository\org\glassfish\jersey\containers\jersey-container-grizzly2-servlet\2.13\jersey-container-grizzly2-servlet-2.13.jar时出错; error in opening zip file [ERROR] 错误: 读取C:\Users\ZILI\.m2\repository\org\glassfish\jersey\containers\jersey-container-servlet-core\2.13\jersey-container-servlet-core-2.13.jar时出错; error in opening zip file [ERROR] 错误: 读取C:\Users\ZILI\.m2\repository\commons-io\commons-io\2.4\commons-io-2.4.jar时出错; error in opening zip file [ERROR] 错误: 读取C:\Users\ZILI\.m2\repository\org\glassfish\jersey\core\jersey-client\2.13\jersey-client-2.13.jar时出错; error in opening zip file [ERROR] 错误: 读取C:\Users\ZILI\.m2\repository\org\apache\bval\bval-jsr303\0.5\bval-jsr303-0.5.jar时出错; error in opening zip file [ERROR] 错误: 读取C:\Users\ZILI\.m2\repository\log4j\log4j\1.2.14\log4j-1.2.14.jar时出错; error in opening zip file [ERROR] 错误: 读取C:\Users\ZILI\.m2\repository\org\apache\httpcomponents\httpclient\4.1\httpclient-4.1.jar时出错; error in opening zip file [ERROR] 错误: 读取C:\Users\ZILI\.m2\repository\com\tustcs\java\base\1.0\base-1.0.jar时出错; error in opening zip file [ERROR] 错误: 读取C:\Users\ZILI\.m2\repository\org\json\json\20140107\json-20140107.jar时出错; error in opening zip file [ERROR] 11 个错误 [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException Process finished with exit code 1 ``` ```
mybatis 创建项目时出错
这是pom文件的配置代码 <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 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com</groupId> <artifactId>mmall</artifactId> <packaging>war</packaging> <version>1.0-SNAPSHOT</version> <name>mmall Maven Webapp</name> <url>http://maven.apache.org</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <maven.compiler.encoding>UTF-8</maven.compiler.encoding> <org.springframework.version>4.0.0.RELEASE</org.springframework.version> <org.mybatis.version>3.4.1</org.mybatis.version> <org.mybatis.spring.version>1.3.0</org.mybatis.spring.version> </properties> <dependencies> <dependency> <groupId>org.apache.tomcat</groupId> <artifactId>tomcat-servlet-api</artifactId> <version>7.0.64</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>${org.springframework.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-oxm</artifactId> <version>${org.springframework.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> <version>${org.springframework.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-tx</artifactId> <version>${org.springframework.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <version>${org.springframework.version}</version> </dependency> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjweaver</artifactId> <version>1.7.3</version> </dependency> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis-spring</artifactId> <version>${org.mybatis.spring.version}</version> </dependency> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>${org.mybatis.version}</version> </dependency> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjrt</artifactId> <version>1.6.11</version> </dependency> <dependency> <groupId>org.codehaus.jackson</groupId> <artifactId>jackson-mapper-asl</artifactId> <version>1.9.12</version> </dependency> <dependency> <groupId>commons-dbcp</groupId> <artifactId>commons-dbcp</artifactId> <version>1.4</version> <!--<scope>runtime</scope>--> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>1.1.2</version> <scope>compile</scope> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-core</artifactId> <version>1.1.2</version> <scope>compile</scope> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.6</version> </dependency> <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> <version>20.0</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>3.5</version> </dependency> <dependency> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> <version>3.2.1</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> <!--<scope>test</scope>--> </dependency> <dependency> <groupId>joda-time</groupId> <artifactId>joda-time</artifactId> <version>2.3</version> </dependency> <!-- id加密解密 --> <dependency> <groupId>org.hashids</groupId> <artifactId>hashids</artifactId> <version>1.0.1</version> </dependency> <!-- ftpclient --> <dependency> <groupId>commons-net</groupId> <artifactId>commons-net</artifactId> <version>3.1</version> </dependency> <!-- file upload --> <!-- https://mvnrepository.com/artifact/commons-fileupload/commons-fileupload --> <dependency> <groupId>commons-fileupload</groupId> <artifactId>commons-fileupload</artifactId> <version>1.2.2</version> </dependency> <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>2.0.1</version> </dependency> <!-- mybatis pager --> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper</artifactId> <version>4.1.0</version> </dependency> <dependency> <groupId>com.github.miemiedev</groupId> <artifactId>mybatis-paginator</artifactId> <version>1.2.17</version> </dependency> <dependency> <groupId>com.github.jsqlparser</groupId> <artifactId>jsqlparser</artifactId> <version>0.9.4</version> </dependency> <!-- alipay --> <dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> <version>1.10</version> </dependency> <dependency> <groupId>commons-configuration</groupId> <artifactId>commons-configuration</artifactId> <version>1.10</version> </dependency> <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>2.6</version> </dependency> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1.1</version> </dependency> <dependency> <groupId>com.google.zxing</groupId> <artifactId>core</artifactId> <version>2.1</version> </dependency> <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> <version>2.3.1</version> </dependency> <dependency> <groupId>org.hamcrest</groupId> <artifactId>hamcrest-core</artifactId> <version>1.3</version> </dependency> <dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId> <version>2.9.0</version> </dependency> </dependencies> <build> <finalName>mmall</finalName> <plugins> <plugin> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-maven-plugin</artifactId> <version>1.3.2</version> <configuration> <verbose>true</verbose> <overwrite>true</overwrite> </configuration> </plugin> <!-- geelynote maven的核心插件之-complier插件默认只支持编译Java 1.4,因此需要加上支持高版本jre的配置,在pom.xml里面加上 增加编译插件 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>1.8</source> <target>1.8</target> <encoding>UTF-8</encoding> <compilerArguments> <extdirs>${project.basedir}/src/main/webapp/WEB-INF/lib</extdirs> </compilerArguments> </configuration> </plugin> </plugins> </build> </project> 这是运行时出错的报告日志: [ERROR] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate (default-cli) on project mmall: Communications link failure [ERROR] [ERROR] Last packet sent to the server was 0 ms ago. [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException 求大神帮助
maven 仓库下载本地失败问题
![图片说明](https://img-ask.csdn.net/upload/201701/05/1483583584_848569.png)如图,从gitlab上checkout下的公司项目,下载maven仓库包依赖时一直出错,重新删除项目和本地仓库,改变了项目路径和本地仓库路径后下载还是不行。尝试拷贝其他机器已下载可以用的包到我本地、重新安装配置java、maven均未解决,总觉得是某个小地方的失误,但一直没有发现:-( 求赐教!
mybatis链接数据时创建项目出错显示
mybatis链接数据时创建项目出错显示 Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate (default-cli) on project mmall: Communications link failure pom.xml文件: <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 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com</groupId> <artifactId>mmall</artifactId> <packaging>war</packaging> <version>1.0-SNAPSHOT</version> <name>mmall Maven Webapp</name> <url>http://maven.apache.org</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <maven.compiler.encoding>UTF-8</maven.compiler.encoding> <org.springframework.version>4.0.0.RELEASE</org.springframework.version> <org.mybatis.version>3.4.1</org.mybatis.version> <org.mybatis.spring.version>1.3.0</org.mybatis.spring.version> </properties> <dependencies> <dependency> <groupId>org.apache.tomcat</groupId> <artifactId>tomcat-servlet-api</artifactId> <version>7.0.64</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>${org.springframework.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-oxm</artifactId> <version>${org.springframework.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> <version>${org.springframework.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-tx</artifactId> <version>${org.springframework.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <version>${org.springframework.version}</version> </dependency> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjweaver</artifactId> <version>1.7.3</version> </dependency> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis-spring</artifactId> <version>${org.mybatis.spring.version}</version> </dependency> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>${org.mybatis.version}</version> </dependency> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjrt</artifactId> <version>1.6.11</version> </dependency> <dependency> <groupId>org.codehaus.jackson</groupId> <artifactId>jackson-mapper-asl</artifactId> <version>1.9.12</version> </dependency> <dependency> <groupId>commons-dbcp</groupId> <artifactId>commons-dbcp</artifactId> <version>1.4</version> <!--<scope>runtime</scope>--> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>1.1.2</version> <scope>compile</scope> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-core</artifactId> <version>1.1.2</version> <scope>compile</scope> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.6</version> </dependency> <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> <version>20.0</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>3.5</version> </dependency> <dependency> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> <version>3.2.1</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> <!--<scope>test</scope>--> </dependency> <dependency> <groupId>joda-time</groupId> <artifactId>joda-time</artifactId> <version>2.3</version> </dependency> <!-- id加密解密 --> <dependency> <groupId>org.hashids</groupId> <artifactId>hashids</artifactId> <version>1.0.1</version> </dependency> <!-- ftpclient --> <dependency> <groupId>commons-net</groupId> <artifactId>commons-net</artifactId> <version>3.1</version> </dependency> <!-- file upload --> <!-- https://mvnrepository.com/artifact/commons-fileupload/commons-fileupload --> <dependency> <groupId>commons-fileupload</groupId> <artifactId>commons-fileupload</artifactId> <version>1.2.2</version> </dependency> <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>2.0.1</version> </dependency> <!-- mybatis pager --> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper</artifactId> <version>4.1.0</version> </dependency> <dependency> <groupId>com.github.miemiedev</groupId> <artifactId>mybatis-paginator</artifactId> <version>1.2.17</version> </dependency> <dependency> <groupId>com.github.jsqlparser</groupId> <artifactId>jsqlparser</artifactId> <version>0.9.4</version> </dependency> <!-- alipay --> <dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> <version>1.10</version> </dependency> <dependency> <groupId>commons-configuration</groupId> <artifactId>commons-configuration</artifactId> <version>1.10</version> </dependency> <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>2.6</version> </dependency> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1.1</version> </dependency> <dependency> <groupId>com.google.zxing</groupId> <artifactId>core</artifactId> <version>2.1</version> </dependency> <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> <version>2.3.1</version> </dependency> <dependency> <groupId>org.hamcrest</groupId> <artifactId>hamcrest-core</artifactId> <version>1.3</version> </dependency> <dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId> <version>2.9.0</version> </dependency> <dependency> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-maven-plugin</artifactId> <version>1.3.2</version> <type>maven-plugin</type> </dependency> <dependency> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.1</version> <type>maven-plugin</type> </dependency> </dependencies> <build> <finalName>mmall</finalName> <plugins> <plugin> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-maven-plugin</artifactId> <version>1.3.2</version> <configuration> <verbose>true</verbose> <overwrite>true</overwrite> </configuration> </plugin> <!-- geelynote maven的核心插件之-complier插件默认只支持编译Java 1.4,因此需要加上支持高版本jre的配置,在pom.xml里面加上 增加编译插件 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.8.0_211</source> <target>1.8.0_211</target> <encoding>UTF-8</encoding> <compilerArguments> <extdirs>${project.basedir}/src/main/webapp/WEB-INF/lib</extdirs> </compilerArguments> </configuration> </plugin> </plugins> </build> </project> 运行日志文件: [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for com:mmall:war:1.0-SNAPSHOT [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 279, column 15 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building mmall Maven Webapp 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- mybatis-generator-maven-plugin:1.3.2:generate (default-cli) @ mmall --- [INFO] Connecting to the Database [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.929s [INFO] Finished at: Wed Jul 10 16:16:58 CST 2019 [INFO] Final Memory: 7M/123M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate (default-cli) on project mmall: Communications link failure [ERROR] [ERROR] Last packet sent to the server was 0 ms ago. [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
tomcat8 startup.bat闪退
运行server.bat出错! ![图片说明](https://img-ask.csdn.net/upload/201912/21/1576911419_571566.png) 运行startup.bat ![图片说明](https://img-ask.csdn.net/upload/201912/21/1576911553_266879.png)
Consul读取超时出错,实力不够,解决不了,请大神帮忙
![图片说明](https://img-ask.csdn.net/upload/201908/27/1566876212_98723.png)
基于gradle的Springcloud 配置 运行出错 这个问题该怎么解决
出错代码: ``` Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled. 2019-08-02 15:29:30.856 ERROR 5440 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPLICATION FAILED TO START *************************** Description: Parameter 0 of method feignAccessLogger in com.cmpay.lemon.framework.autoconfigure.feign.FeignAutoConfiguration required a bean of type 'com.cmpay.lemon.common.codec.DesensitizationObjectEncoder' that could not be found. - Bean method 'desensitizationObjectEncoder' not loaded because @ConditionalOnClass did not find required class 'com.cmpay.lemon.framework.jackson.sensitive.DesensitizationObjectMapperObjectCodec' Action: Consider revisiting the conditions above or defining a bean of type 'com.cmpay.lemon.common.codec.DesensitizationObjectEncoder' in your configuration. Process finished with exit code 1 ``` 出错的DesensitizationObjectEncoder的内容 ``` @Configuration @ConditionalOnClass({Desensitization.class}) public class DesensitizationConfiguration { @Bean public DesensitizationConfigurer desensitizationConfigurer() { return new DesensitizationConfigurer(); } @Configuration @ConditionalOnClass(DesensitizationObjectMapperObjectCodec.class) public static class DesensitizationObjectEncoderConfiguration { @Bean @ConditionalOnMissingBean public DesensitizationObjectEncoder desensitizationObjectEncoder(Jackson2ObjectMapperBuilder builder, DesensitizationConfigurer configurer) { ObjectMapper objectMapper = builder.build(); return new DesensitizationObjectMapperObjectCodec(objectMapper, configurer); } } } ```
sso单点登录访问出错求助
我在GitHub上下了一个demo,然后导入idea中,部署到本地的Tomcat服务器中,然后不知道该怎么访问,各种访问路径都试过了,还是访问失败 项目有一个父工程和四个自工程,包括一个客户端、服务端、两个系统服务端
spring cloud RestTemplat使用出错
![图片说明](https://img-ask.csdn.net/upload/201903/17/1552787757_984368.png)![图片说明](https://img-ask.csdn.net/upload/201903/17/1552787770_860177.png) 在使用springcloud 搭建微服务的时候,需要做一个新增的功能,就需要从调用端传一个对象到服务端接受,并且处理,但是我在使用RestTemplat.postEntity的时候发现我传不过去..一直找了好久问题所在,一直找不到错误,服务端接受的实体对象总是 为空
在插入一个新用户的时候一直显示网络错误
![图片说明](https://img-ask.csdn.net/upload/201906/21/1561105721_387160.png)这一段出错,是这个文件有问题吗![图片说明](https://img-ask.csdn.net/upload/201906/21/1561105870_774201.png) if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(Ut[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),k.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),k.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return k.globalEval(e),e}}}),k.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),k.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=k("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Vt,Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||k.expando+"_"+kt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Vt=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=mt(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&k.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?k("<div>").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===k.css(e,"position"))e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=ze(y.pixelPosition,function(e,t){if(t)return t=_e(e,n),$e.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}}),k.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),k.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),k.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||k.guid++,i},k.holdReady=function(e){e?k.readyWait++:k.ready(!0)},k.isArray=Array.isArray,k.parseJSON=JSON.parse,k.nodeName=N,k.isFunction=m,k.isWindow=x,k.camelCase=V,k.type=w,k.now=Date.now,k.isNumeric=function(e){var t=k.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return k});var Qt=C.jQuery,Jt=C.$;return k.noConflict=function(e){return C.$===k&&(C.$=Jt),e&&C.jQuery===k&&(C.jQuery=Qt),k},e||(C.jQuery=C.$=k),k}); $.ajax({ type: "post", url: getPath() + "/registerUser", async: false, dataType:'json', contentType: 'application/json', data:JSON.stringify({"id":0,"name":userName,"password":userPassword,"email":userEmail,"role":false}), success: function (data) { if (data.flag) { $('#userName').addClass('is-valid'); $('#userPassword').addClass('is-valid'); $('#userEmail').addClass('is-valid'); $('#userPasswordCheck').addClass('is-valid'); $('#registerResult').addClass('alert alert-success'); $('#registerResult').html('注册成功!跳转至<a href="login.html">登录</a>界面') setTimeout(window.location.href = 'login.html', 5000); } else { alert('注册失败'); } }, error: function () { alert("网络错误"); } }) }
关于execel 出现 unable to read entire header的问题 求各位大神分析一下 哪里出错了!!!!
![图片说明](https://img-ask.csdn.net/upload/201906/15/1560566983_95309.png) ``` public static Workbook fillExcelDataWithTemplate(List<StatisticsDTO> list ,String templateFileUrl) { Workbook wb = null ; try { File file = new File(templateFileUrl); if(!file.exists()){ file.createNewFile(); } POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream(file)); wb = new HSSFWorkbook(fs); // 取得 模板的 第一个sheet 页 Sheet sheet = wb.getSheetAt(0); // 拿到sheet页有 多少列 int cellNums = sheet.getRow(0).getLastCellNum(); // 从第2行 开搞 下标1 就是第2行 int rowIndex = 1; Row row ; for(StatisticsDTO statisticsDTO : list){ row = sheet.createRow(rowIndex); rowIndex ++; row.createCell( 0).setCellValue(statisticsDTO.getId()); row.createCell(1).setCellValue(statisticsDTO.getNewUserCount()); row.createCell(2).setCellValue(statisticsDTO.getTotalPayCount()); row.createCell(3).setCellValue(statisticsDTO.getTotalPayNum()); row.createCell(4).setCellValue(statisticsDTO.getWeixinpayPayCount()); row.createCell(5).setCellValue(statisticsDTO.getWeixinpayPayNum()); row.createCell(6).setCellValue(statisticsDTO.getAlipayPayCount()); row.createCell(7).setCellValue(statisticsDTO.getAlipayPayNum()); row.createCell(8).setCellValue(statisticsDTO.getDggPayCount()); row.createCell(9).setCellValue(statisticsDTO.getDggPayNum()); row.createCell(10).setCellValue(DateUtil.formatDate(statisticsDTO.getCreateTime(),"yyyy-MM-dd HH:mm:ss")); } } catch (IOException e) { e.printStackTrace(); } return wb; } ```
if (args.length == 0) 这是哪里出问题了?
运行客户端程序就是args.length == 0 哪里出错了? ```public class ClientMain { public static void main(String[] args) throws IOException { if (args.length == 0){ System.out.println("You did not specify the method of performing the calculations: net or local"); return; } IProxy proxy; String option = args[0]; if (option.equals("net")) proxy = new NetProxy(); else if (option.equals("local")) proxy = new CalculatorProxy(); else { System.out.println("unknown input parameter: " + option); return; } Scanner scanner = new Scanner(System.in); System.out.print("Enter x: "); double x = scanner.nextDouble(); System.out.print("Enter y: "); double y = scanner.nextDouble(); double result = proxy.multiply(x, y); System.out.println("Multiplication result: " + result); } } ```
在中国程序员是青春饭吗?
今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...
《MySQL 性能优化》之理解 MySQL 体系结构
本文介绍 MySQL 的体系结构,包括物理结构、逻辑结构以及插件式存储引擎。
【资源】一个C/C++开发工程师的学习路线(已经无路可退,唯有逆风飞翔)【内附资源页】
声明: 1)该文章整理自网上的大牛和专家无私奉献的资料,具体引用的资料请看参考文献。 2)本文仅供学术交流,非商用。所以每一部分具体的参考资料并没有详细对应。如果某部分不小心侵犯了大家的利益,还望海涵,并联系博主删除。 3)博主才疏学浅,文中如有不当之处,请各位指出,共同进步,谢谢。 4)此属于第一版本,若有错误,还需继续修正与增删。还望大家多多指点。大家都共享一点点,一起为祖国科研的推进...
程序员请照顾好自己,周末病魔差点一套带走我。
程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。
20道你必须要背会的微服务面试题,面试一定会被问到
写在前面: 在学习springcloud之前大家一定要先了解下,常见的面试题有那块,然后我们带着问题去学习这个微服务技术,那么就会更加理解springcloud技术。如果你已经学了springcloud,那么在准备面试的时候,一定要看看看这些面试题。 文章目录1、什么是微服务?2、微服务之间是如何通讯的?3、springcloud 与dubbo有哪些区别?4、请谈谈对SpringBoot 和S...
达摩院十大科技趋势发布:2020 非同小可!
【CSDN编者按】1月2日,阿里巴巴发布《达摩院2020十大科技趋势》,十大科技趋势分别是:人工智能从感知智能向认知智能演进;计算存储一体化突破AI算力瓶颈;工业互联网的超融合;机器间大规模协作成为可能;模块化降低芯片设计门槛;规模化生产级区块链应用将走入大众;量子计算进入攻坚期;新材料推动半导体器件革新;保护数据隐私的AI技术将加速落地;云成为IT技术创新的中心 。 新的画卷,正在徐徐展开。...
轻松搭建基于 SpringBoot + Vue 的 Web 商城应用
首先介绍下在本文出现的几个比较重要的概念: 函数计算(Function Compute): 函数计算是一个事件驱动的服务,通过函数计算,用户无需管理服务器等运行情况,只需编写代码并上传。函数计算准备计算资源,并以弹性伸缩的方式运行用户代码,而用户只需根据实际代码运行所消耗的资源进行付费。Fun: Fun 是一个用于支持 Serverless 应用部署的工具,能帮助您便捷地管理函数计算、API ...
Python+OpenCV实时图像处理
目录 1、导入库文件 2、设计GUI 3、调用摄像头 4、实时图像处理 4.1、阈值二值化 4.2、边缘检测 4.3、轮廓检测 4.4、高斯滤波 4.5、色彩转换 4.6、调节对比度 5、退出系统 初学OpenCV图像处理的小伙伴肯定对什么高斯函数、滤波处理、阈值二值化等特性非常头疼,这里给各位分享一个小项目,可通过摄像头实时动态查看各类图像处理的特点,也可对各位调参、测试...
2020年一线城市程序员工资大调查
人才需求 一线城市共发布岗位38115个,招聘120827人。 其中 beijing 22805 guangzhou 25081 shanghai 39614 shenzhen 33327 工资分布 2020年中国一线城市程序员的平均工资为16285元,工资中位数为14583元,其中95%的人的工资位于5000到20000元之间。 和往年数据比较: yea...
为什么猝死的都是程序员,基本上不见产品经理猝死呢?
相信大家时不时听到程序员猝死的消息,但是基本上听不到产品经理猝死的消息,这是为什么呢? 我们先百度搜一下:程序员猝死,出现将近700多万条搜索结果: 搜索一下:产品经理猝死,只有400万条的搜索结果,从搜索结果数量上来看,程序员猝死的搜索结果就比产品经理猝死的搜索结果高了一倍,而且从下图可以看到,首页里面的五条搜索结果,其实只有两条才是符合条件。 所以程序员猝死的概率真的比产品经理大,并不是错...
害怕面试被问HashMap?这一篇就搞定了!
声明:本文以jdk1.8为主! 搞定HashMap 作为一个Java从业者,面试的时候肯定会被问到过HashMap,因为对于HashMap来说,可以说是Java集合中的精髓了,如果你觉得自己对它掌握的还不够好,我想今天这篇文章会非常适合你,至少,看了今天这篇文章,以后不怕面试被问HashMap了 其实在我学习HashMap的过程中,我个人觉得HashMap还是挺复杂的,如果真的想把它搞得明明白...
毕业5年,我问遍了身边的大佬,总结了他们的学习方法
我问了身边10个大佬,总结了他们的学习方法,原来成功都是有迹可循的。
python爬取百部电影数据,我分析出了一个残酷的真相
2019年就这么匆匆过去了,就在前几天国家电影局发布了2019年中国电影市场数据,数据显示去年总票房为642.66亿元,同比增长5.4%;国产电影总票房411.75亿元,同比增长8.65%,市场占比 64.07%;城市院线观影人次17.27亿,同比增长0.64%。 看上去似乎是一片大好对不对?不过作为一名严谨求实的数据分析师,我从官方数据中看出了一点端倪:国产票房增幅都已经高达8.65%了,为什...
推荐10个堪称神器的学习网站
每天都会收到很多读者的私信,问我:“二哥,有什么推荐的学习网站吗?最近很浮躁,手头的一些网站都看烦了,想看看二哥这里有什么新鲜货。” 今天一早做了个恶梦,梦到被老板辞退了。虽然说在我们公司,只有我辞退老板的份,没有老板辞退我这一说,但是还是被吓得 4 点多都起来了。(主要是因为我掌握着公司所有的核心源码,哈哈哈) 既然 4 点多起来,就得好好利用起来。于是我就挑选了 10 个堪称神器的学习网站,推...
这些软件太强了,Windows必装!尤其程序员!
Windows可谓是大多数人的生产力工具,集娱乐办公于一体,虽然在程序员这个群体中都说苹果是信仰,但是大部分不都是从Windows过来的,而且现在依然有很多的程序员用Windows。 所以,今天我就把我私藏的Windows必装的软件分享给大家,如果有一个你没有用过甚至没有听过,那你就赚了????,这可都是提升你幸福感的高效率生产力工具哦! 走起!???? NO、1 ScreenToGif 屏幕,摄像头和白板...
阿里面试,面试官没想到一个ArrayList,我都能跟他扯半小时
我是真的没想到,面试官会这样问我ArrayList。
曾经优秀的人,怎么就突然不优秀了。
职场上有很多辛酸事,很多合伙人出局的故事,很多技术骨干被裁员的故事。说来模板都类似,曾经是名校毕业,曾经是优秀员工,曾经被领导表扬,曾经业绩突出,然而突然有一天,因为种种原因,被裁员了,...
大学四年因为知道了这32个网站,我成了别人眼中的大神!
依稀记得,毕业那天,我们导员发给我毕业证的时候对我说“你可是咱们系的风云人物啊”,哎呀,别提当时多开心啦????,嗯,我们导员是所有导员中最帅的一个,真的???? 不过,导员说的是实话,很多人都叫我大神的,为啥,因为我知道这32个网站啊,你说强不强????,这次是绝对的干货,看好啦,走起来! PS:每个网站都是学计算机混互联网必须知道的,真的牛杯,我就不过多介绍了,大家自行探索,觉得没用的,尽管留言吐槽吧???? 社...
良心推荐,我珍藏的一些Chrome插件
上次搬家的时候,发了一个朋友圈,附带的照片中不小心暴露了自己的 Chrome 浏览器插件之多,于是就有小伙伴评论说分享一下我觉得还不错的浏览器插件。 我下面就把我日常工作和学习中经常用到的一些 Chrome 浏览器插件分享给大家,随便一个都能提高你的“生活品质”和工作效率。 Markdown Here Markdown Here 可以让你更愉快的写邮件,由于支持 Markdown 直接转电子邮...
看完这篇HTTP,跟面试官扯皮就没问题了
我是一名程序员,我的主要编程语言是 Java,我更是一名 Web 开发人员,所以我必须要了解 HTTP,所以本篇文章就来带你从 HTTP 入门到进阶,看完让你有一种恍然大悟、醍醐灌顶的感觉。 最初在有网络之前,我们的电脑都是单机的,单机系统是孤立的,我还记得 05 年前那会儿家里有个电脑,想打电脑游戏还得两个人在一个电脑上玩儿,及其不方便。我就想为什么家里人不让上网,我的同学 xxx 家里有网,每...
2020 年,大火的 Python 和 JavaScript 是否会被取而代之?
Python 和 JavaScript 是目前最火的两大编程语言,但是2020 年,什么编程语言将会取而代之呢? 作者 |Richard Kenneth Eng 译者 |明明如月,责编 | 郭芮 出品 | CSDN(ID:CSDNnews) 以下为译文: Python 和 JavaScript 是目前最火的两大编程语言。然而,他们不可能永远屹立不倒。最终,必将像其他编程语言一...
史上最全的IDEA快捷键总结
现在Idea成了主流开发工具,这篇博客对其使用的快捷键做了总结,希望对大家的开发工作有所帮助。
阿里程序员写了一个新手都写不出的低级bug,被骂惨了。
这种新手都不会范的错,居然被一个工作好几年的小伙子写出来,差点被当场开除了。
谁是华为扫地僧?
是的,华为也有扫地僧!2020年2月11-12日,“养在深闺人不知”的华为2012实验室扫地僧们,将在华为开发者大会2020(Cloud)上,和大家见面。到时,你可以和扫地僧们,吃一个洋...
AI 没让人类失业,搞 AI 的人先失业了
最近和几个 AI 领域的大佬闲聊 根据他们讲的消息和段子 改编出下面这个故事 如有雷同 都是巧合 1. 老王创业失败,被限制高消费 “这里写我跑路的消息实在太夸张了。” 王葱葱哼笑一下,把消息分享给群里。 阿杰也看了消息,笑了笑。在座几位也都笑了。 王葱葱是个有名的人物,21岁那年以全额奖学金进入 KMU 攻读人工智能博士,累计发表论文 40 余篇,个人技术博客更是成为深度学习领域内风向标。 ...
2020年,冯唐49岁:我给20、30岁IT职场年轻人的建议
点击“技术领导力”关注∆每天早上8:30推送 作者|Mr.K 编辑| Emma 来源|技术领导力(ID:jishulingdaoli) 前天的推文《冯唐:职场人35岁以后,方法论比经验重要》,收到了不少读者的反馈,觉得挺受启发。其实,冯唐写了不少关于职场方面的文章,都挺不错的。可惜大家只记住了“春风十里不如你”、“如何避免成为油腻腻的中年人”等不那么正经的文章。 本文整理了冯...
神级宝库!GitHub 标星 1.2w+,Chrome 最天秀的插件都在这里啦!
作者 | Rocky0429 来源 | Python空间 大家好,我是 Rocky0429,一个沉迷 Chrome 不能自拔的蒟蒻… 作为一个在远古时代用过什么 IE、360、猎豹等浏览器的资深器哥,当我第一次了解 Chrome 的时候,就被它的美貌给吸引住了… 就在我用了一段时间之后,我坚决的卸载了电脑上其它碍眼的浏览器,并觉得在之前的搬砖生涯中,我不配当哥,我只配是个沙雕… ...
作为一名大学生,如何在B站上快乐的学习?
B站是个宝,谁用谁知道???? 作为一名大学生,你必须掌握的一项能力就是自学能力,很多看起来很牛X的人,你可以了解下,人家私底下一定是花大量的时间自学的,你可能会说,我也想学习啊,可是嘞,该学习啥嘞,不怕告诉你,互联网时代,最不缺的就是学习资源,最宝贵的是啥? 你可能会说是时间,不,不是时间,而是你的注意力,懂了吧! 那么,你说学习资源多,我咋不知道,那今天我就告诉你一个你必须知道的学习的地方,人称...
那些年,我们信了课本里的那些鬼话
教材永远都是有错误的,从小学到大学,我们不断的学习了很多错误知识。 斑羚飞渡 在我们学习的很多小学课文里,有很多是错误文章,或者说是假课文。像《斑羚飞渡》: 随着镰刀头羊的那声吼叫,整个斑羚群迅速分成两拨,老年斑羚为一拨,年轻斑羚为一拨。 就在这时,我看见,从那拨老斑羚里走出一只公斑羚来。公斑羚朝那拨年轻斑羚示意性地咩了一声,一只半大的斑羚应声走了出来。一老一少走到伤心崖,后退了几步,突...
张朝阳回应迟到 1 分钟罚 500:资本家就得剥削员工
loonggg读完需要2分钟速读仅需 1 分钟大家我,我是你们的校长。前几天,搜狐的董事局主席兼 CEO 张朝阳和搜狐都上热搜了。原因很简单,就是搜狐出了“考勤新规”。一封搜狐对员工发布...
一个程序在计算机中是如何运行的?超级干货!!!
强烈声明:本文很干,请自备茶水!???? 开门见山,咱不说废话! 你有没有想过,你写的程序,是如何在计算机中运行的吗?比如我们搞Java的,肯定写过这段代码 public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } ...
立即提问