自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(45)
  • 收藏
  • 关注

原创 java file outside of source root Java主类没法启动

2024-03-26 22:17:51 142

原创 关于mysql无法添加中文数据的问题以及解决方案

出现这样的问题就是在创建数据库时 数据库字符集 没有选择uft8, 数据库校对规则没有选择utf8-bin。也可以用鼠标选中你的数据库,有单击鼠标,选择---更改数据库,就会看到数据库字符集和数据库校对规则都不对。可以查看你的这个数据库的定义规则。重启数据库,这个时候你发现原先的这个表插入数据还是没有卵用。把数据库字符集和数据库校对规则 分别改成 utf8 utf8_bin。归根结底 创建数据库时 没有选择 utf8 和utf8_bin。往数据库表插入语句时,插入中文字段,中文直接变成?

2024-03-20 16:01:52 350

原创 TooManyResultsException: Expected one result (or null) to be returned by selectOne(), but found: 2

通过selecet one 想要得到一个结果,结果发现数据库里有两个结果。原因就是数据库中有重复的数据。

2024-03-11 19:58:24 173

原创 connection SQLException, url:jdbc ,errorCode 0, state 08S01

添加:&useSSL=false。

2024-03-11 19:39:57 295

原创 测试号管理,接口配置信息,配置失败的问题

但是每次提交信息后,在IDEA上输出来的微信服务器发过来的签名和我开发者服务器通过sha1加密算出来的签名完全一样的,说明我填写的URL 地址和 Token以及写的代码没有错误,看了一眼,写着:另请注意,微信公众号接口必须以http://或https://开头,分别支持80端口和443端口。于是我果断注册花生壳,用花生壳后,发现它APP上直接写着https:// 指定支持443端口,验证微信服务器有效性时,在接口配置信息页面一提交信息,就显示配置失败,我之前下载ngrok,页面显示非常简单,

2023-10-20 17:05:14 1255

原创 ERR_NGROK_108

在电脑里找到这个文件,将这个文件ngrok.yml删除!Ngrok闪退,并且 报108错误,

2023-10-17 19:38:16 709

原创 可牛办公卸载的方法

首先在桌面上右单击可牛办公的快捷方式,找到可牛办公在电脑里面的目标位置,然后在木匾位置所在的文件夹里搜索关键词officetemplate。将这个应用程序删除,

2023-03-14 11:23:14 7922 5

原创 Cannot run program “D:\JDK\bin\java.exe“ (in directory “C:\Program Files\JetBrains\IntelliJ IDEA 202

Cannot run program "D:\JDK\bin\java.exe" (in directory "C:\Program Files\JetBrains\IntelliJ IDEA 2022.2.3\bin"): CreateProcess error=2, 系统找不到指定的文件。

2023-03-14 09:55:32 14104 2

原创 Java中变量的分类——成员变量、局部变量

一文道破成员变量和局部变量

2022-09-23 22:14:07 717

原创 packaging‘ with value ‘jar‘ is invalid. Aggregator projects require ‘pom‘ as packaging.

'packaging' with value 'jar' is invalid. Aggregator projects require 'pom' as packaging.打包方式为jar包的打包方式无效,多模块项目需要POM的打包方式第二个箭头的地方指明了出问题的地方,The project com.changgou:changgou_web:1.0-SNAPSHOT (C:\JavaProject\07changgou_class\changgou_parent_3622\chan.

2022-01-06 02:31:40 6645 1

原创 Could not autowire.No beans of ‘ConnectionFactory‘ type found

Could not autowire.No beans of 'ConnectionFactory' type found错误的原因主要在于导错包正确的包,应该为import org.springframework.amqp.rabbit.connection.ConnectionFactory;

2021-12-28 11:38:11 4198

原创 java.lang.Exception: No runnable methods

错误在这里,主要原因是因为导错包正确的包,应该是这个如果对你有帮助,麻烦点个赞

2021-12-22 19:06:15 241

原创 ElasticsearchException: failed to map source XXX to class XXXX

ElasticsearchException: failed to map source XXXto class XXXX出现这种情况原因就是实体类中缺少空参构造在实体类中,添加空参构造即可如果对你有用,麻烦顺手点个赞

2021-12-19 21:12:31 353

原创 Invalid cluster node 127.0.0.1.9300 in 127.0.0.1.9300 Must be in the format host

Invalid cluster node 127.0.0.1.9300 in 127.0.0.1.9300! Must be in the format host:port! 错误在此:应该为:

2021-12-18 23:47:18 7882

原创 org.springframework.cloud.config.server.environment.NoSuchLabelException: No such label: main

在使用springcloud的配置中心的配置文件时,会遇到这样的情况:org.springframework.cloud.config.server.environment.NoSuchLabelException: No such label: main,虽然不影响程序的运行,但是对我一个追求完美的程序员来说,有点这样的小bug也实在看不下去。因为默认的标签是main, 而我们在配置文件中配置的标签不是main,所以就会报这样的小bug.我们只需要把默认的label,改成我们在配置文件中.

2021-12-11 18:01:09 2629 1

原创 Failed to introspect Class [org.springframework.cloud.gateway.config.GatewayAutoConfiguration$NettyC

Failed to introspect Class [org.springframework.cloud.gateway.config.GatewayAutoConfiguration$NettyConfiguration] from ClassLoader [sun.misc.Launcher$AppClassLoader@18b4aac2]Error processing condition on org.springframework.cloud.gateway.config.GatewayAu

2021-12-07 10:33:05 5476 4

原创 @HystrixCommand 曝红

在pom.xml导入如下依赖即可<dependency> <groupId>com.netflix.hystrix</groupId> <artifactId>hystrix-javanica</artifactId> <version>RELEASE</version></dependency>如果对你有帮助,请点个赞!!!...

2021-12-04 12:23:09 432

原创 Could not autowire. No beans of ‘DiscoveryClient‘ type found.

导错包所致,正确的导包:

2021-12-03 16:51:43 246

原创 spring-boot-maven-plugin 曝红的问题

加上版本号,与Springboot的版本号相同即可

2021-11-24 20:48:38 170

原创 No provider available from registry 127.0.0.1:2181 for service com.itheima.service.ReportService on

No provider available from registry 127.0.0.1:2181 for service com.itheima.service.ReportService on consumer 192.168.181.1 use dubbo version 2.6.2, please check status of providers(disabled, not registered or in blacklist).落下了:@Service...

2021-11-21 06:47:01 1412 1

原创 运行时异常:org.springframework.security.access.AccessDeniedException: Access is denied

在项目中集成spring-security安全框架时,运行时异常:org.springframework.security.access.AccessDeniedException: Access is denied在每个axios请求之前加上这句话后就好了 //允许携带认证cookies,axios.defaults.withCredentials=true;...

2021-11-15 18:48:16 653

原创 Could not find result map com.itheima.dao.OrderDao.Map

此处应为resultType

2021-11-13 02:28:30 300

原创 login.html?logout isn‘t a valid redirect URL

箭头所指的位置,不要忘了加/

2021-11-07 03:09:29 192

原创 nested exception is org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or n

nested exception is org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned by selectOne(), but found: 3本来只想要一个结果,结果出现了太多得结果把数据库中重复得数据,删除就好了!...

2021-10-22 22:30:55 677

原创 No provider available from registry 127.0.0.1:2181 for service com.itheima.service.

缺少@Service注解

2021-10-22 18:32:51 925

原创 NestedServletException: Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError:

NestedServletException: Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: XXXXXXX嵌套Servlet异常,大部分情况是,依赖嵌套,E依赖D,D依赖C,C依赖B,B依赖A,且A中导入了依赖管理,这样只需在E中导入依赖即可,中间的就不需要再导入依赖,中间的再导入E中已经导入的依赖,这个时候运行程序就会报嵌套异常...

2021-10-22 18:28:13 4907

原创 Error creating bean with name ‘jobTrigger‘ defined in class path resource [spring-job.xml]: Invocati

Error creating bean with name 'jobTrigger' defined in class path resource [spring-job.xml]: Invocation of init method failed; nested exception is java.text.ParseException: Unexpected end of expression.设置Quatz定时任务出现的一个小问题小失误酿打错,*和?中间应有空格...

2021-10-18 20:35:46 239

原创 Failed to meta-introspect annotation interface org.springframework.web.bind.annotation.RequestBody:

出错原因:注解Refence引用的不对,应该引用dubbo的注解

2021-10-16 21:55:31 303

原创 Error in event handler for “click“: “TypeError: Cannot read property ‘validate‘ of undefined“

正确的写法是这样:ref="dataAddForm" ref="" 这个双引号之内,不能有单引号。

2021-09-26 04:50:35 4929

原创 Spring整合SpringMVC时:NoClassDefFoundError: org/springframework/core/log/LogDelegateFactory

控制台报错信息:Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]: Constructor threw exception; neste

2021-09-08 22:10:54 358

原创 Mybatis:Cannot find class: com.mysql.cj.jdbc.Driver

与数据库驱动有关:改成:问题完美解决

2021-09-07 18:05:45 181

原创 SpringMVC:No converter found for return value of type: class com.itheima.pojo.User

SpringMVC自动进行JSON数据转换需要的依赖坐标<!--JSON数据转换支持--><dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId> <version>2.9.0</version></dependency><dep...

2021-09-02 02:57:30 1085 4

原创 Tomcat运行时的警告:基于APR的本地库加载失败.错误报告为[no tcnative-1 in java.library.path:

no tcnative-1 in java.library.path根图所示将Tomcat==>bin下的 tcnative-1.dll 应用复制一下,粘贴到JDK==>bin目录下:

2021-08-29 10:30:27 4903 3

原创 Caused by: java.lang.IllegalArgumentException: servlet映射中的<url pattern>[*action]无效

问题出在这个地方正确的写法应该是:

2021-08-29 05:21:04 1008

原创 在spring容器应用中出现如下报错:通配符的匹配很全面, 但无法找到元素 ‘context:component-scan‘ 的声明。

一看报错提示,就是beans.xml配置文件中有问题,那就到配置文件中找原因。原配置文件:自已一看少了两行代码http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd修改后的配置文件...

2021-08-18 20:25:53 84

原创 java: 找不到符号 符号: 类 Account 位置: 程序包 com.itheima.pojo

解决方法:

2021-08-12 18:08:44 2177

原创 解决Mybatis中SqlMapConfig.xml配置文件中<configuration>标签报错的问题

解决方案是:在 Mybatis 的配置文件中,各 configuration 的属性必须按照规定的先后顺序进行排序,否则就会出错properties settings typeAliases typeHandlers objectFactory plugins environments databaseProvicer mappers...

2021-08-10 17:37:51 690

原创 ResultMapException: Error attempting to get column ‘username‘ from result set. 教大家根据控制台提示,排除异常

今天有伙伴,遇到这样一个提示,来问我怎么排除异常,ResultMapException: Error attempting to get column 'username' from result set. Cause: java.sql.SQLDataException: Cannot convert string '王五' to java.sql.Date value‘异常分析:结果映射异常,从结果集获取列username时错误。java中sql语句中的SQL数据异常:不能将字符串类型.

2021-08-09 06:56:54 4738

原创 Mybatis,多环境数据源配置中,出现的Environment.getDataSource()“ because “environment“ is null 问题

Cannot invoke "org.apache.ibatis.mapping.Environment.getDataSource()" because "environment" is null异常提示:环境是空的,那就到多环境配置文件中去看一下从代码中可以清楚得看到,一共配置三种环境,分别是dev,test,pro,但是多环境数据源的配置 <environments>标签中:default属性值写错了,没有先这三种环境中得一种,所以提示"environm...

2021-08-03 10:53:22 1504

原创 解决在添加依赖后,pom.xml中代码曝红的问题,即Dependency‘xxx‘not found问题

在我们添加依赖后

2021-07-31 03:07:06 328

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除