#这篇文章用来记录学习过程中遇到的BUG以及相应的解决方式
#The JSP specification requires that an attribute name is preceded by whitespace
定位错误:
解决方式:在这边缺少一个空格,将空格填上问题解决。
java.sql.Exception: Colum ‘createTime’ not found
解决方式:修改修改正确的表段
MD5加密没能将字符串加密,按需要将图示部分修改成md5
模态框没法加载
解决方式:按钮没有设置ID,并且没有绑定模态框属性data-toggle="modal" data-target="#myModal"
Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.testSpring.dao.UserDao' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)}
解决方式:换成@Repository
解决方案:xml配置bean
javamail出错
com/sun/mail/util/MailLogger
问题定位:导错包了
解决方式:导入正确的jar包
Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@42d3bd8b] to prepare test instance [com.testspring.Testes@67d48005]
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.testspring.Testes': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.testspring.dao.UserDao' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)}
报错信息:NoSuchBeanDefinitionException
解决方式
spring没有实例化对象,也就无法根据配置文件执行依赖注入
缺少实例化,在userdaoImpl上添加@Service,进行依赖注入
MyBatis 环境配置出错,出现could not find resouces com/mybatis/mapper/UserMapper.xml
could not find resouces com/mybatis/mapper/UserMapper.xml
错误原因:mybatis配置文件中,对应文件路径地址写成了com.mybatis.mypper的形式
解决方式:
<!--问题代码定位位置-->
<!-- mapper 配置文件指定文件数量可配置多个-->
<mappers>
<!--这里的路径地址是用下划线分割的,而不是com.mybatis.mapper.UserMapper.xml的形式-->
<mapper resource="com/mybatis/mapper/UserMapper.xml" />
</mappers>
org.apache.ibatis.exceptions.PersistenceException:
### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'in (
错误原因:SQL写错了
错误原因:
端口被占用,服务器启动了2个
解决方式:关闭一个终端或者重启电脑
错误信息:
错误原因:
错误信息
错误原因
解决方式
错误原因:没有继承BaseService,导致spring实例化失败
错误代码:Illegal invocation
解决方案:对应ajax出错,请检查
HTTP ERROR: 503
Problem accessing /crm/main. Reason:
SERVICE_UNAVAILABLE
Powered by Jetty://
问题定位:mybatis.xml配置出错
没有扫描需要使用的bao
在这里插入代码片
在这里插入代码片
在这里插入代码片
在这里插入代码片
在这里插入代码片
在这里插入代码片
在这里插入代码片
在这里插入代码片
在这里插入代码片
在这里插入代码片
在这里插入代码片