问题起因 最近,项目组的里的同事遇到一个问题,他自己负责的模块,SpringMVC的Controller与其他模块的Controller 类名重名了,导致整个工程都起不来了. 后台报的错误是这样的: ××Controller' for bean class [××ontroller] conflicts with existing, non-compatible bean definition of same name and class 午饭时,他一直和我抱怨这个问题,还说找不到办法. 后面我…
业务场景: A.B两个单位,系统部署同一套代码: A.B两系统能相互访问: 要求将数据从A系统同步到B系统,再将反馈信息回发给A: 实际开发情况: 因为系统比较小,最开始设计架构的时候没有考虑到消息互通的方式,也没有设计分布式部署,所以采用AbstractRoutingDataSource灵活切换数据源的方式直接在业务代码中实现数据交互. 项目代码: applicationContext-common.xml: <?xml version="1.0" encoding="…
今天升级一个spring项目遇到如下错: HTTP Status 500 - Request processing failed; nested exception is org.apache.tiles.definition.DefinitionsFactoryException: I/O Error reading definitions. org.springframework.web.util.NestedServletException: Request processing fail…
Tomcat  con/ service.xml  配置如下一行代码: <Context reloadable="true"/> </Host> 然后以debug模式进行开发就行了.…
Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [applicationContext.xml]; nested exception is org.springframework.context.annotation.Co…
使用Spring开发的时候报错如下: Caused by: org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'userDaoImpl' for bean class [cn.arebirth.impl.UserDaoImpl] conflicts with existing, non-compatible bean definitio…
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected excep tion parsing XML document from file [F:\java6\idear2010\idear2010\WEB-INF\classe s\applicationContext.xml]; nested exception is java.lang.IllegalStateException: Annotati…
问题: 用Maven搭建spring.springmvc.mybatis时,运行报错: org.springframework.beans.factory.BeanDefinitionStoreException: Could not resolve bean definition resource pattern [classpath:spring/applicationContext-*.xml]; nested exception is java.io.FileNotFoundExcept…
While developing a page with multiple scrolls levels, and especially when using a grid, you may get the error Data being added conflicts with existing data. (18,2). This suggests a problem with the key structures in the tables in your lower scroll le…
Following is the configuration file Beans.xml where we defined "helloWorld" bean which has two properties message1 and message2. Next "helloIndia" bean has been defined as a child of "helloWorld" bean by using parent attribut…
背景:学习Spring,在使用注解@Bean的name属性配置<bean>实例时,不能注册实例成功 报错 WARNING: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'config…
这个错误是 org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unexpected failure during bean definition parsing Offending resource: class path resource [applicationContext.xml] Bean 'stu'; nested exception is…
Spring Bean Definition https://www.tutorialspoint.com/spring/spring_bean_definition.htm The objects that form the backbone of your application and that are managed by the Spring IoC container are called beans. A bean is an object that is instantiated…
为了弄清楚Bean是怎么来的,花费了大把功夫,现在要把Bean Definition的加载.解析.处理.注册到bean工厂的过程记下来.这只是bean definition 的加载.解析.处理.注册过程中的一种. 好记性不如烂笔头. 首先我已经知道bean definition 存在了哪里:它就存在一个Map对象中,如果使用的是DefaultListableBeanFactory的话,它就存在一个ConcurrentHashMap对象中. /** bean 的名字为键,BeanDefinitio…
调试Spring项目出现No bean class specified on bean definition异常 但是控制台并没有给出其他相关信息了 这个时候可以在AbstractBeanDefinition的源码抛出异常的位置添加断点开始调试  通过监视得到抛出该异常的类的相关信息 从而解决问题…
写在前面的话&&About me 网上写spring的文章多如牛毛,为什么还要写呢,因为,很简单,那是人家写的:网上都鼓励你不要造轮子,为什么你还要造呢,因为,那不是你造的. 我不是要造spring,我只是想把自己学习spring的一些感想,一些心得说出来,希望大家看到有不对的地方,一定不吝赐教. 说说我自己,13年小本毕业,软件工程专业,校招去了最近疯传的牢厂总部里待了2年,15年越狱出来,某落魄互联网公司(PC时代风头无两)待了1年,慨叹深圳买房之艰难,遂于16年底回蓉.趁着热血未冷,…
写在前面的话 相关背景及资源: 曹工说Spring Boot源码系列开讲了(1)-- Bean Definition到底是什么,附spring思维导图分享 工程代码地址 思维导图地址 工程结构图: 正文 我这里,先把org.springframework.beans.factory.config.BeanDefinition接口的方法再简单列一下: public interface BeanDefinition extends AttributeAccessor, BeanMetadataEle…
写在前面的话 相关背景及资源: 曹工说Spring Boot源码系列开讲了(1)-- Bean Definition到底是什么,附spring思维导图分享 工程代码地址 思维导图地址 工程结构图: 大体思路 选择bean definition实现类,并实例化bean definition 注册bean definition get bean查看是否work 选择bean definition实现类 这次,先说目的:我们要通过代码方式手动生成bean definition并注册到bean fact…
写在前面的话 相关背景及资源: 曹工说Spring Boot源码系列开讲了(1)-- Bean Definition到底是什么,附spring思维导图分享 工程代码地址 思维导图地址 工程结构图: 大体思路 总体来说,bean definition是什么,我们前面几讲,说了个大概了:目前,我们将聚焦于怎么获取bean definition. 我们这次做个实验,就是将bean definition(一共两个bean,有依赖关系,依赖是手动指定的)定义在json文件内,然后自定义一个applicat…
启动tomcat,访问一个web项目失败,查看日志,发现异常信息: 18-Jul-2019 15:22:16.822 严重 [main] org.apache.catalina.core.StandardContext.listenerStart 异常将上下文初始化事件发送到类的侦听器实例.[org.springframework.web.context.ContextLoaderListener] org.springframework.beans.factory.BeanDefinition…
http://blog.csdn.net/z69183787/article/details/37819627#comments 一.声明式事务配置: <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> <property name="dataSource" ref=&quo…
环境描述 前端:jsp 后端:SpringMVC Controller 尽管jsp页面已设置了pageEncoding: <%@page contentType="text/html" pageEncoding="UTF-8"%> 然后在控制器中,读取到的对应参数如果含有中文,则出现乱码,例如: public ModelAndView search(@RequestParam("keyword") String keyword) {…
错误原因:这是由于 php 5.3版本后.要求继承类必须在父类之后定义.否则就会出现Strict Standards: PHP Strict Standards: Declaration of .... should be compatible with that of .... 的错误提示.也就是说必须父类在前,继承类在后.错误参考页面.bugs.php.net/bug.php?id=46851  上面清楚地解释了出现此类错误的具体原因.解决办法:error_reporting(E_ALL &…
使用以下命令安装: rpm -ivh MySQL-server-5.6.19-1.linux_glibc2.5.x86_64.rpm 错误提示如下: Preparing...                ########################################### [100%] file /usr/share/mysql/charsets/README from install of MySQL-server-5.6.19-1.linux_glibc2.5.x86_6…
在springMVC中我们经常会用到<mvc:resources/>标签,但是有些编辑器中的schema过于陈旧.导致找不到<mvc:resources/>标签. 经过试验,有两个解决办法: 1.替换文件: 打开window->preferences,在输入框输入xml找到xml Catalog.在右边中找到http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd 这一项并单击,看下面的Details,找到文件路…
严重: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/SpringMvc]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167…
 使用Maven+SpringMVC+Eclipse软件安装配置过程中的问题: 1.Eclipse总是卡死的解决办法: 一:内存不足所以会卡死,配置一下eclipse.ini修改这几个值就好了-XX:MaxPermSize=768m-Xms1024m-Xmx3072m搜索 二:修改window->preferences --- > JAVA->Edittor->Hovers,将右侧所有复选框清空. 2.因为eclipse上一次未正常关闭,导致启动卡死,错误日志为: [plain…
看到“conflicts”,是产生冲突了,文件“/usr/share/mysql/charsets/*”需要MySQL-server-5.6.19-1.linux_glibc2.5.x86_64版本的,而系统已经存在mysql-libs-5.1.71-1.el6.x86_64版本的! 解决办法: 执行以下命令,删除mysql-libs-5.1.71-1.el6.x86_64: yum -y remove mysql-libs-5.1.71* 再执行以下命令安装MySQL: rpm -ivh My…
问题描述:在使用mybatis对数据库执行更新操作时,parameterType为某个具体的bean,而bean中传入的参数为null时,抛出异常如下:org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property=’khzx’, m…
最近开发一个新项目时,搭建springmvc框架时,遇到一个拦截器失效的情况困扰了两天.现在解决,特此记录一下. 拦截器不生效的情况描述: 设置登录拦截的时候,首先登录接口肯定是不用拦截的.所以需要在<mvc:interceptors>的标签中,添加<mvc:exclude-mapping>,作用是排除不需要拦截的请求. 但是,实际运行中,登录接口被拦截到了,也就是说<mvc:exclude-mapping>标签没起作用. 当时检查了所有可能的配置,包括头信息schem…