问题描述
Could not open ServletContext resource [/WEB-INF/Dispatcher-servlet.xml]
解决方案
-
注意< param-name>里的值必须是 contextConfigLocation
添加< init-param>< /init-param>的内容(否则默认在/WEB-INF/下)
问题描述
Error:Cannot build artifact ‘ghostPlanner:war exploded’ because it is included into a circular dependency
问题描述
项目重命名之后有可能会出现这种问题,只要删除多余的Artifact即可。
问题描述
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
解决方案
1、Mapper.xml和Mapper.java的名称是否一致,是否在同一个包下面 2、mapper.xml的namespace配置是否准确 3、mapper.java中的方法是否都存在于mapper.xml中 4、mapper.xml里< select>元素是否正确配置了ResultMap或ResultType (< select>元素详解) 5、mapper的xml路径是否配置正确 6、target目录下是否有mapper对应的xml文件,如果没有,在pom文件中添加如下信息: 问题描述
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisUtil': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.data.redis.core.StringRedisTemplate' 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=)}
解决方案
-
@Autowired 使用默认类型注入。把@Autowired 改成 @Resource
-
applicationContext.xml 配置错误,使用了注解的类不在扫描的包中。 保险一点的做法就是把所有包都扫描,但这样无疑会降低效率
问题描述
Mybatis中传入多参数读取
解决方案
方法一:在接口函数处采用@Parm()表明你的函数别名,在xml中就可以直接使用 方法二:直接用Param1,Param2表示第几个参数
问题描述
pojo没有实现Serializable接口
解决方案
控制台出现了从数据库查到的信息,但是报错,提示没有实例化。pojo类实现了Serializable接口之后,结果成功出现。因为是网络传输,所以必须要将对象转换为字节流才能够进行传输,所以在分布式应用中,你就得实现序列化。
-



