1:你建立的web项目,如果像 getMapping 注解报错,然后jar包下载完后,你可以鼠标定位在注解上,点击下边的 fix setup
2:error messge : The superclass "javax.servlet.http.HttpServlet" was not found on the Java Bu,(可以百度)
错误位置:
解决方法一直(还是由于jar包没导),在pom.xml中添加如下代码:
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
3:Spring.xml 的 namespace空间的可选项XSD不足:大部分都是jar包异常
4:在使用Spring-security 安全框架的时候,给web.xml中配置filter之后宝下面的错误:
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'springSecurityFilterChain' available
原因:你的Spring-security的jar包没下好
----------------------------------------------------------------------------------------
如果控制台准确的报了哪里有错误,先仔细检查那处,看看是不是key或者value出错-
-----------------------------------------------------------
org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.atguigu.mybatis_plus1.mapper.UserMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
看一下你的 @MapperScanner():里边的是否有错 和 你的mapper接口上是否加了注解,
----------------------------------------java.lang.StackOverflowError: null
原因:
1:查询时产生了死循环或无限递归
2. 局部静态变量体积太大
---------------------------------------
JsonParseException :json 字符串解析异常
----------------------------------
web.xml is missing and <failOnMissingWebXml> is set to true
:这时候需要右击项目——>Java EE Tools——>Generate Deployment Descriptor Stub.然后系统会在src/main/webapp/WEB_INF文件加下创建web.xml文件。错误解决!
--------------------------------------------
java.lang.AbstractMethodError: null:
在写Spring- cloud 项目时,报了上面的错误: 有可能是添加@EnableEurekaClient的jar包添加错误
------------------------------------------------------------------
Error creating bean with name 'sqlSessionFactory' defined in class path resource
Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException
Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception;
nested exception is com.baomidou.mybatisplus.core.exceptions.MybatisPlusException:
Error: GlobalConfigUtils setMetaData Fail ! Cause:java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)
下次遇见这个错:先检查 application.properties文件中的数据库的 密码是否错误
--------------------------------------
面试题:注册中心宕了怎么办?微服务会自己重连,会自己重新连接 三次
----------------------------------------------------------------
报如下的错误:
No qualifying bean of type 'com.guli.statistics.client.UcenterClient' available: expected at least 1 bean which qualifies as autowire candidate.
可能的原因:
一是:@Component这个注解没有在 UcenterClient这个类上添加
二是:启动类上没有添加 :@EnableFeignClients这个注解
=========================================================
解决java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use
:就是一定要有启动类:并且测试类与启动类的目录结构要一致!!!
==============
403:拒接访问:可能是没添加跨域注解;
登录是从一个url--->另外一个url
========================================】
Invalid bound statement (not found): com.atguigu.gmall.pms.mapper.ProductCategoryMapper.listWithChild
这个错误:表示我们在运行项目的时候,并没有将mapper文件进行扫描到
================================
No provider available from registry 192.168.126.69:2181 for service com.atguigu.gmall.pms.service.BrandService on consumer 10.0.0.143 use dubbo version 2.6.2, please check status of providers(disabled, not registered or in blacklist).] with root cause
这个错是:Service 的impl 中 没有添加
@com.alibaba.dubbo.config.annotation.Service
@Component两个注解
==============================================
: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'gmall_sms.pms_product' doesn't exist
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
:这个错是因为在sharding中数据库的表名写错了
===========================================
Parameter 'ids' not found. Available parameters are [arg1, arg0, param1, param2]
=========================================
如果说页面上的list 分页数据不正确,可能是 :
1:你没安装分页插件
2:你的new Page<>()的小括号中没有 携带参数:Integer pageNum, Integer pageSize
===============================================
在数据库集群中,如果从库与主库之间数据同步失败,就看看
=====================================
session 与 cookie 机制是 基于 同一个 域名下才有效的。
===========================
1:Spring-orm: 包括了Spring框架操作数据库的全部jar包:Spring-jdbc 、Spring-orm、Spring-tx,里边有我们需要使用的方法等等。
2:只要与数据库有关,就需要导入数据库连接池与数据库驱动:com.alibaba/druid 和 mysql-connector-java
=======================================================
【由于jedis版本变换导致的问题,信息config 下的配置】
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jedisPoolConfig' defined in class path resource [com/atguigu/gmall/pms/config/JedisConfig.class]: Unsatisfied dependency expressed through method 'jedisPoolConfig' parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.data.redis.connection.jedis.JedisConnectionFactory' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
===============================================
6:Java Web解决已经导入了jar包 却仍出现 java.lang.NoClassDefFoundError的问题