{"action":"created","issue":{"url":"https://api.github.com/repos/mybatis/spring-boot-starter/issues/108","repository_url":"https://api.github.com/repos/mybatis/spring-boot-starter","labels_url":"https://api.github.com/repos/mybatis/spring-boot-starter/issues/108/labels{/name}","comments_url":"https://api.github.com/repos/mybatis/spring-boot-starter/issues/108/comments","events_url":"https://api.github.com/repos/mybatis/spring-boot-starter/issues/108/events","html_url":"https://github.com/mybatis/spring-boot-starter/issues/108","id":185283863,"number":108,"title":"Compatibility issue with spring boot 1.4.x","user":{"login":"zxkane","id":843303,"avatar_url":"https://avatars.githubusercontent.com/u/843303?v=3","gravatar_id":"","url":"https://api.github.com/users/zxkane","html_url":"https://github.com/zxkane","followers_url":"https://api.github.com/users/zxkane/followers","following_url":"https://api.github.com/users/zxkane/following{/other_user}","gists_url":"https://api.github.com/users/zxkane/gists{/gist_id}","starred_url":"https://api.github.com/users/zxkane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zxkane/subscriptions","organizations_url":"https://api.github.com/users/zxkane/orgs","repos_url":"https://api.github.com/users/zxkane/repos","events_url":"https://api.github.com/users/zxkane/events{/privacy}","received_events_url":"https://api.github.com/users/zxkane/received_events","type":"User","site_admin":false},"labels":[{"id":265085580,"url":"https://api.github.com/repos/mybatis/spring-boot-starter/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-10-26T02:47:12Z","updated_at":"2016-11-22T15:29:01Z","closed_at":"2016-11-02T21:08:39Z","body":"Everything works fine when using mybatis-spring-boot-starter 1.1.1 and spring boot 1.3.8. Even upgrading mybatis lib to latest 3.4.1.\n\nAfter upgrading spring boot to 1.4.1, I got below exception when launching my app,\n\n> Caused by: org.springframework.core.NestedIOException: Failed to parse mapping resource: 'URL [jar:file:build/libs/hezhibo-backend-1.0.0.jar!/BOOT-INF/classes/com/cn/zbb/mapping/DmClassInfoMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Result Maps collection already contains value for com.cn.zbb.dao.DmClassInfoDao.mapper_resultMap[BaseResultMap]_collection[teacher]\n>   at org.mybatis.spring.SqlSessionFactoryBean.buildSqlSessionFactory(SqlSessionFactoryBean.java:522)\n>   at org.mybatis.spring.SqlSessionFactoryBean.afterPropertiesSet(SqlSessionFactoryBean.java:381)\n>   at org.mybatis.spring.SqlSessionFactoryBean.getObject(SqlSessionFactoryBean.java:546)\n>   at org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration.sqlSessionFactory(MybatisAutoConfiguration.java:130)\n>   at org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration$$EnhancerBySpringCGLIB$$52861ccb.CGLIB$sqlSessionFactory$0(<generated>)\n>   at org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration$$EnhancerBySpringCGLIB$$52861ccb$$FastClassBySpringCGLIB$$821313a.invoke(<generated>)\n>   at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)\n>   at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356)\n>   at org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration$$EnhancerBySpringCGLIB$$52861ccb.sqlSessionFactory(<generated>)\n>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n>   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n>   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n>   at java.lang.reflect.Method.invoke(Method.java:498)\n>   at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)\n>   ... 67 common frames omitted\n> Caused by: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Result Maps collection already contains value for com.cn.zbb.dao.DmClassInfoDao.mapper_resultMap[BaseResultMap]_collection[teacher]\n>   at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:120)\n>   at org.apache.ibatis.builder.xml.XMLMapperBuilder.parse(XMLMapperBuilder.java:92)\n>   at org.mybatis.spring.SqlSessionFactoryBean.buildSqlSessionFactory(SqlSessionFactoryBean.java:520)\n>   ... 80 common frames omitted\n> Caused by: java.lang.IllegalArgumentException: Result Maps collection already contains value for com.cn.zbb.dao.DmClassInfoDao.mapper_resultMap[BaseResultMap]_collection[teacher]\n>   at org.apache.ibatis.session.Configuration$StrictMap.put(Configuration.java:837)\n>   at org.apache.ibatis.session.Configuration$StrictMap.put(Configuration.java:809)\n>   at org.apache.ibatis.session.Configuration.addResultMap(Configuration.java:591)\n>   at org.apache.ibatis.builder.MapperBuilderAssistant.addResultMap(MapperBuilderAssistant.java:214) \n\nThe mapper xml looks like below,\n\n```\n<mapper namespace=\"com.cn.zbb.dao.DmClassInfoDao\" >\n  <resultMap id=\"BaseResultMap\" type=\"com.cn.zbb.model.DmClassInfo\" >\n    <id column=\"DMCI_ID\" property=\"dmciId\" jdbcType=\"INTEGER\" />\n    <result column=\"DMCI_Class_Name\" property=\"dmciClassName\" jdbcType=\"VARCHAR\" />\n    <result column=\"DMCI_Teacher_ID\" property=\"dmciTeacherId\" jdbcType=\"INTEGER\" />\n    <result column=\"DMCI_Remark\" property=\"dmciRemark\" jdbcType=\"VARCHAR\" />\n    <result column=\"DMCI_School_ID\" property=\"dmciSchoolId\" jdbcType=\"INTEGER\" />\n    <result column=\"DMCI_Grade_Name\" property=\"dmciGradeName\" jdbcType=\"VARCHAR\" />\n    <result column=\"DMCI_Grade_Type\" property=\"dmciGradeType\" jdbcType=\"VARCHAR\" />\n    <result column=\"DMCI_Update_Time\" property=\"dmciUpdateTime\" jdbcType=\"TIMESTAMP\" />\n    <result column=\"DMCI_GUID\" property=\"dmciGuid\" jdbcType=\"VARCHAR\" />\n    <collection property=\"teacher\" ofType=\"com.cn.zbb.model.DmTeacherInfo\">\n        <id column=\"DMTI_ID\" property=\"dmtiId\" jdbcType=\"INTEGER\" />\n        <result column=\"DMTI_Teacher_Name\" property=\"dmtiTeacherName\" jdbcType=\"VARCHAR\" />\n        <result column=\"DMTI_Sex\" property=\"dmtiSex\" jdbcType=\"VARCHAR\" />\n        <result column=\"DMTI_ID_Number\" property=\"dmtiIdNumber\" jdbcType=\"VARCHAR\" />\n        <result column=\"DMTI_Home_Address\" property=\"dmtiHomeAddress\" jdbcType=\"VARCHAR\" />\n        <result column=\"DMTI_Telephone\" property=\"dmtiTelephone\" jdbcType=\"VARCHAR\" />\n        <result column=\"DMTI_Mailbox\" property=\"dmtiMailbox\" jdbcType=\"VARCHAR\" />\n        <result column=\"DMTI_Education\" property=\"dmtiEducation\" jdbcType=\"VARCHAR\" />\n        <result column=\"DMTI_QQ\" property=\"dmtiQq\" jdbcType=\"VARCHAR\" />\n        <result column=\"DMTI_State\" property=\"dmtiState\" jdbcType=\"VARCHAR\" />\n        <result column=\"DMTI_School_ID\" property=\"dmtiSchoolId\" jdbcType=\"INTEGER\" />\n        <result column=\"DMTI_Update_Time\" property=\"dmtiUpdateTime\" jdbcType=\"TIMESTAMP\" />\n        <result column=\"DMTI_GUID\" property=\"dmtiGuid\" jdbcType=\"VARCHAR\" />\n    </collection>\n  </resultMap>\n```\n\nAny suggestion?\n"},"comment":{"url":"https://api.github.com/repos/mybatis/spring-boot-starter/issues/comments/262271551","html_url":"https://github.com/mybatis/spring-boot-starter/issues/108#issuecomment-262271551","issue_url":"https://api.github.com/repos/mybatis/spring-boot-starter/issues/108","id":262271551,"user":{"login":"kazuki43zoo","id":5616270,"avatar_url":"https://avatars.githubusercontent.com/u/5616270?v=3","gravatar_id":"","url":"https://api.github.com/users/kazuki43zoo","html_url":"https://github.com/kazuki43zoo","followers_url":"https://api.github.com/users/kazuki43zoo/followers","following_url":"https://api.github.com/users/kazuki43zoo/following{/other_user}","gists_url":"https://api.github.com/users/kazuki43zoo/gists{/gist_id}","starred_url":"https://api.github.com/users/kazuki43zoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kazuki43zoo/subscriptions","organizations_url":"https://api.github.com/users/kazuki43zoo/orgs","repos_url":"https://api.github.com/users/kazuki43zoo/repos","events_url":"https://api.github.com/users/kazuki43zoo/events{/privacy}","received_events_url":"https://api.github.com/users/kazuki43zoo/received_events","type":"User","site_admin":false},"created_at":"2016-11-22T15:29:01Z","updated_at":"2016-11-22T15:29:01Z","body":"Hi guys, there are bug that provides duplicate resources form the `PathMatchingResourcePatternResolver` since Spring Boot 1.4(Spring 4.3). For example, path pattern such as `classpath*:/**/mappers/**/*.Mapper.xml` does not work on Spring Boot 1.4.  \r\nThis is a regression introduced by [SPR-13685](https://jira.spring.io/browse/SPR-13685). For details refer to the [SPR-14934](https://jira.spring.io/browse/SPR-14934).\r\n\r\nProbably, this issue will fix since Spring Boot 1.4.3(Spring 4.3.5).\r\n\r\n\r\n"}}
{"actor":{"display_login":"kazuki43zoo"}}