
Debug
文章平均质量分 60
_Delores_
这个作者很懒,什么都没留下…
展开
-
Maven发布出错:Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy
Maven发布jar包报错:Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy原因:缺少配置解决:在Maven配置文件settings.xml中加配置在目录…\apache-maven-3.2.3-bin\apache-maven-3.2.3\conf下打开文件settings.xml,增加配置。<!-- servers | This is a list of authent原创 2021-02-03 15:56:32 · 18760 阅读 · 3 评论 -
Class ‘XXX‘ must either be declared abstract or implement abstract method ‘xxx‘
最近引入外部jar包,继承抽象类时出现这个问题,Class ‘XXX’ must be declared abstract or implement abstract method ‘xxx’,这里IDEA给提示了,该类需要被申明为抽象的,或者实现父类的 ‘xxx’ 方法(抽象方法)。问题:这里我们不想申明该子类为抽象类,也实现了父类的抽象方法,可还是有这个问题。解决办法:后来发现是作用域的问题,父类的抽象方法没有显示表明为public,而是默认default,又因为该父类方法是外部包的抽象类,导原创 2021-01-22 10:23:06 · 48995 阅读 · 5 评论 -
使用multipart/form-data方式上传文件
本文将介绍使用multipart/form-data方式上传文件的方式和踩坑。文章目录使用RestTemplate框架上传文件使用HttpURLConnection 上传文件报文件为空的问题使用RestTemplate框架上传文件调用postForObject接口上传文件,直接上代码@Testpublic void restTemplateTransferFile(){ final String filePath = "picture/testFile.jpg"; //相对地址,也可以使用原创 2020-12-03 14:15:10 · 15997 阅读 · 1 评论 -
JPA 更新操作里面的坑
文章目录JPA 更新操作使用save()方法更新数据踩到的坑1、不能更新数据2、多次更新数据,报StaleObjectStateException异常获取数据库对象findById().get()JPA 更新操作JPA 更新操作主要有两种:1、使用save()方法1)保存一个实体:repository.save(T entity)2)保存多个实体:repository.save(Iterable entities)3)保存并立即刷新一个实体:repository.saveAndFlush(T原创 2020-12-02 17:42:48 · 6487 阅读 · 0 评论 -
Debug:java.text.ParseException: Unparseable date: ““
代码SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); Date d = df.parse("20201105");抛出异常java.text.ParseException: Unparseable date: ""提高代码的健壮性,例如利用try-catch块来进行处理原因:SimpleDateFormat("yyyy-MM-dd")里面的格式与.parse("20201105")不一致,输入的字符串要和你想要的格式长度都一原创 2020-11-05 18:10:43 · 235 阅读 · 0 评论 -
报错:java.lang.NoSuchMethodError: com.gnete.dao.criterion.SelectCriteria.isIgnoreNull()Z
报错:java.lang.NoSuchMethodError: com.gnete.dao.criterion.SelectCriteria.isIgnoreNull()Z相关代码public SelectCriteria(SelectCriteria criteria) { this(); this.ignoreNull = criteria.ignoreNull; this.ignoreBlank = criteria.ignoreBlank; this.orderByClaus原创 2020-11-03 16:42:03 · 220 阅读 · 0 评论 -
Debug:No enum constant org.apache.ibatis.type.JdbcType.Integer
原因mybatis中JdbcType没有Integer类型,可查看映射表,mapper或配置中将INTEGER写成了IntegerMybatisjavaSQLintegerint OR IntegerINTEGERlonglong OR java.lang.LongBIGINTshortshort OR java.lang.ShortSMALLINTfloatfloat OR java.lang.FloatFLOATdoubledouble原创 2020-10-26 15:12:12 · 973 阅读 · 0 评论 -
dubbo 配置接口不生效
dubbo 配置接口不生效1、首先排除maven导包问题,看是否导入该包。没有导入的话,看看pom文件是否引入相关依赖2、再看看是否导入接口名称写错。原创 2020-10-19 17:17:05 · 1429 阅读 · 0 评论 -
测试微信公众号,如何把openId写入到Local Storage
本地测试公众号页面,需要把微信的openId写入到浏览器的本地存储中,自己傻了,还去找Local Storage的本地文件夹,或者使用命令在Chrome的命令行写入,这里其实忽略了一个问题,在打开http://localhost:8080时,检测不通过就自动跳转到“需要在微信登录”的页面。解决办法:浏览器打开一个可运行的http://localhost:8080页面,在其中Local Storage写入openId的信息即可。写入信息的方式有两种,F12打开开发者工具,之后见下图:放大②输入命令:原创 2020-09-09 09:51:09 · 894 阅读 · 0 评论 -
Debug:npm ERR! chromedriver@2.46.0 install: `node install.js`
npm ERR! chromedriver@2.46.0 install: node install.js原因:该问题是vue-cli脚手架的一个bug,chromedriver的部分文件被国内网络给墙掉了,无法下载完整的chromedirver包,从淘宝镜像下载chromedriver即可解决。解决办法:npm install chromedriver --chromedriver_cdnurl=http://cdn.npm.taobao.org/dist/chromedrivernpm WA原创 2020-09-02 18:41:35 · 444 阅读 · 0 评论 -
VSCode 报错:could not establish connection to “XXX“.Connecting was canceled.
VSCode 报错:could not establish connection to “XXX”.Connecting was canceled.解决办法方法一:可以在连接远程主机时选择对应的系统:方法二:配置Remote - SSH,打开配置文件。增加一行代码{ "remote.SSH.remotePlatform": { "连接名": "该连接对应的系统" }, "git.ignoreLegacyWarning": true}之后又出问题原创 2020-07-03 23:38:25 · 32907 阅读 · 6 评论 -
Either targetObject or targetClass for the field must be specified
报错: java.lang.IllegalArgumentException: Either targetObject or targetClass for the field must be specifiedjava.lang.IllegalArgumentException: Either targetObject or targetClass for the field must be specified at org.springframework.util.Assert.isTrue(As原创 2020-06-23 16:21:24 · 6706 阅读 · 0 评论 -
Navicat Premium远程连接Oracle
新建连接Navicat连接远程Oracle报错:ORA-28547:connection to server failed,probable Oracle Net admin error原因:Navicat是通过Oracle客户端连接Oracle服务器,我们用Navicat时通常会在自己的安装路径下包含多个版本的OCI,如果用Navicat连接Oracle服务器出现ORA-28547错误时...原创 2020-01-06 16:40:49 · 712 阅读 · 0 评论 -
PLSQL 远程连接Oracle
PLSQL 远程连接OraclePLSQL要远程连接Oracle数据库,首先要先在本地下载一个Oracle Client,然后进行配置即可。下载Oracle Client在Oracle Instant Client Downloads下载对于版本的Oracle Client,直接解压到本地任意目录。Oracle Client配置在 Oracle Client 解压文件夹下新建文件夹\n...原创 2020-01-03 18:07:38 · 399 阅读 · 0 评论 -
eclipse报错:java was started but returned exit code=13
其他电脑的直接eclipse复制到另一主机,解压运行报错:java was started but returned exit code=13主要原因:JDK版本的问题解决办法:下载与eclipse匹配的jdk,或者在eclipse.ini中设置jdk的版本,保证eplise使用的jdk版本,加入的参数是(路径要换成自己jdk安装的目录,定位文件是同一个jvm.dll;参数放在放在-vmarg...原创 2020-01-02 17:49:52 · 469 阅读 · 0 评论 -
git提交文件报错:Updates were rejected because the remote contains work that you do not have locally.
git提交文件报错:hint: Updates were rejected because the remote contains work that you dohint: not have locally. This is usually caused by another repository pushinghint: to the same ref. You may want to ...原创 2019-12-19 17:58:36 · 553 阅读 · 0 评论 -
JPA根据Id获取数据时报错(Type definition error: [simple type, class JavassistLazyInitializer)
在用springboot根据id获取一个对象时出现以下异常:Type definition error: [simple type, class org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer]; nested exception is com.fasterxml.jackson.databind.exc.Invalid...原创 2019-11-08 15:03:59 · 8617 阅读 · 0 评论 -
JPA插入数据时报错(could not execute statement)
JPA插入数据时报错(could not execute statement)There was an unexpected error (type=Internal Server Error, status=500).could not execute statement; nested exception is org.hibernate.exception.GenericJDBCExce...原创 2019-11-08 14:57:57 · 15659 阅读 · 0 评论 -
spring boot自动注入出现Consider defining a bean of type 'xxx' in your configuration问题
搭建完spring boot的demo后自然要实现自动注入来体现spring ioc的便利了,但是我在实施过程中出现了这么一个问题,见下面,这里找到解决办法记录下来,供遇到同样的问题的同僚参考Description:Field userRepository in com.addresslist.controller.UserController required a bean of type...原创 2019-11-06 23:48:41 · 860 阅读 · 0 评论 -
springboot使用JPA数据访问启动报错:Cannot determine embedded database driver class for database type NONE
springboot使用JPA数据访问启动报错:Cannot determine embedded database driver class for database type NONEmaven工程: SpringBoot1.5 +Web+JPA+MYSQL+JDBC报错信息如下:***************************APPLICATION FAILED TO STAR...原创 2019-11-07 00:09:22 · 2347 阅读 · 0 评论 -
springboot使用jpa启动报错consider defining a bean of type '*.*.**Repository' in your configuration.
springboot使用JPA数据访问启动报错consider defining a bean of type ‘..**Repository’ in your configuration.maven工程: SpringBoot1.5 +Web+JPA+MYSQL+JDBC报错信息***************************APPLICATION FAILED TO START...原创 2019-11-07 00:00:11 · 1996 阅读 · 0 评论 -
国际化过程中的中文乱码问题
解决办法:对IDEA的编码进行设置本来答主设置了Default Settings,但是还是乱码,重启项目也不管用,最后灵光一现查看了一现Setting选项卡,发现问题,默认设置完成也要注意检查Setting选项卡是否与默认一致。修改后的效果:...原创 2019-08-22 23:07:50 · 2450 阅读 · 0 评论 -
在Docker中使用MySQL 8 版本数据库
本文主要目的是:在虚拟机环境下使用Docker,安装MySQL数据库,然后再局域网中访问它。系统环境:Windows7 + 虚拟机CentOS 7MySQL 8.0文章目录1、在Linux下安装Docker2、在Docker中下安装MySQL3、端口映射4、远程访问常见问题1、**Host 'x.x.x.x.' is not allowed to connect to this MySQ...原创 2019-08-27 17:44:20 · 2419 阅读 · 0 评论 -
Host ‘x.x.x.x.’ is not allowed to connect to this MySQL server.
在局域网中远程连接数据库报错:Host ‘x.x.x.x.’ is not allowed to connect to this MySQL server.原因:未给root用户赋予远程登录权限解决办法:1、查看当前运行的docker容器[root@localhost ~]# docker psCONTAINER ID IMAGE COMMA...原创 2019-08-27 18:02:35 · 846 阅读 · 0 评论 -
2059 - Authentication plugin ‘xxxxxxx’ cannot be loaded:XXXX(无法加载身份验证插件)
在局域网中使用Docker远程连接数据库报错:2059 - Authentication plugin ‘xxxxxxx’ cannot be loaded:XXXXXX (无法加载身份验证插件)原因:mysql8 之前的版本中加密规则是mysql_native_password,而在mysql8之后,加密规则是caching_sha2_password解决办法:更改加密规则1、查看当前...原创 2019-08-27 18:18:26 · 5807 阅读 · 1 评论 -
SpringBoot启动报错:HikariPool-1 - Exception during pool initialization.
SpringBoot启动报错:HikariPool-1 - Exception during pool initialization.com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure原因:jdbc连接失败解决办法:1、仔细检查username、password、url中IP地...原创 2019-08-28 14:03:56 · 57165 阅读 · 8 评论 -
SpringBoot中配置sql文件执行控制台不报错却没有建表
SpringBoot中配置sql文件执行控制台不报错却没有建表使用SpringBoot 2.1.7.RELEASE版本因为SpringBoot在启动时,只有检测到spring.datasource.initialization-mode=ALWAYS配置,然后再检测spring.datasource.schema,且配置的sql文件中命令不为空,才会去执行schema和spring.datas...原创 2019-08-28 16:40:48 · 1892 阅读 · 0 评论 -
SpringBoot报错:The elements [spring.datasource.schema[0].classpath ] were left unbound.
SpringBoot报错:org.springframework.boot.context.properties.bind.UnboundConfigurationPropertiesException: The elements [spring.datasource.schema[0].classpath,spring.datasource.schema[1].classpath] were l...原创 2019-08-29 11:41:57 · 19070 阅读 · 1 评论 -
SpringBoot自定义启动器报错:xxxxAutoConfiguration中的需要XXXProperties.class类型的bean找不到
SpringBoot自定义启动器报错:Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.2019-08-30 16:31:11.600 ERROR 8916 --- [ main] o.s.b.d....原创 2019-08-30 18:23:13 · 1979 阅读 · 0 评论 -
创建spring boot项目时无法访问https://start.spring.io的解决方法
最近用IDEA创建spring boot项目总是报错,用浏览器访问https://start.spring.io时,会被百度云加速的安全检查拦截,要输入验证码才能登录,导致无法访问。而在IDEA中,一直连不上官网,报403错误。试了网上各种办法,像关闭浏览器代理,IDEA的设置(setting ->HTTP Proxy->check connection),关闭防火墙都试过不起作用。...原创 2019-09-06 12:06:46 · 3933 阅读 · 2 评论 -
AmqpConnectException: java.net.ConnectException: Connection timed out: conn
org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection timed out: connect在SpringBoot中使用RabbitMQ时,容易出现、连接不成功的情况原因有下:1、SpringBoot的版本和RabbitMQ的版本不对应2、连接端口,默认5672,连接主机的端口也...原创 2019-09-07 22:17:27 · 2223 阅读 · 0 评论 -
SpringBoot整合ElasticSearch报错: java.net.UnknownHostException: http://x.x.x.x
SpringBoot整合ElasticSearch报错: java.net.UnknownHostException: http://x.x.x.x2019-09-09 21:26:40.845 ERROR 8800 --- [ main] o.s.boot.SpringApplication : Application startup faile...原创 2019-09-09 21:55:24 · 3649 阅读 · 0 评论 -
报错:NestedIOException: Failed to parse mapping resource
报错:NestedIOException: Failed to parse mapping resource详细信息如下:BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw...原创 2019-09-10 23:35:40 · 8832 阅读 · 1 评论 -
用cmd关闭8080端口
当运行web程序时常常会遇到端口被占用的情况,我们有两种处理办法:修改访问的端口号用cmd关闭相应的端口打开命令行,输入netstat -o -n -a | findstr :8080,我们就能看到相关的端口号及其状态。关闭正处与监听状态(Listening)的端口号8080,最后一行对应的是进程的PID,输入命令taskkill /F /PID 3116这样就完成了,我们再次...原创 2019-08-22 22:21:22 · 10730 阅读 · 0 评论