{"action":"created","issue":{"url":"https://api.github.com/repos/mybatis/spring/issues/100","labels_url":"https://api.github.com/repos/mybatis/spring/issues/100/labels{/name}","comments_url":"https://api.github.com/repos/mybatis/spring/issues/100/comments","events_url":"https://api.github.com/repos/mybatis/spring/issues/100/events","html_url":"https://github.com/mybatis/spring/issues/100","id":124910610,"number":100,"title":"Bean creation exception on FactoryBean type check","user":{"login":"cwt9562","id":5601727,"avatar_url":"https://avatars.githubusercontent.com/u/5601727?v=3","gravatar_id":"","url":"https://api.github.com/users/cwt9562","html_url":"https://github.com/cwt9562","followers_url":"https://api.github.com/users/cwt9562/followers","following_url":"https://api.github.com/users/cwt9562/following{/other_user}","gists_url":"https://api.github.com/users/cwt9562/gists{/gist_id}","starred_url":"https://api.github.com/users/cwt9562/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cwt9562/subscriptions","organizations_url":"https://api.github.com/users/cwt9562/orgs","repos_url":"https://api.github.com/users/cwt9562/repos","events_url":"https://api.github.com/users/cwt9562/events{/privacy}","received_events_url":"https://api.github.com/users/cwt9562/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-05T07:16:52Z","updated_at":"2016-01-05T07:59:47Z","closed_at":null,"body":"I got many warnings when I bootstrap my app with spring 4.1.8, mybatis 3.2.7 & mybatis-spring 1.2.2.\r\n\r\n一月 05, 2016 3:00:13 下午 org.springframework.beans.factory.support.DefaultListableBeanFactory getTypeForFactoryBean\r\n警告: Bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'fileAttributeMapper' defined in file [E:\\ELearning\\DEV\\Code\\Java\\common-center\\resource-center\\resource-center-service\\target\\classes\\com\\netdragon\\resource\\center\\transform\\dao\\FileAttributeMapper.class]: Cannot resolve reference to bean 'simpleSqlSessionFactoryBean' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'simpleSqlSessionFactoryBean': Requested bean is currently in creation: Is there an unresolvable circular reference?\r\n\r\nThese are two mapperScannerConfigurers and two sqlSessionFactoryBeans.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/mybatis/spring/issues/comments/168929307","html_url":"https://github.com/mybatis/spring/issues/100#issuecomment-168929307","issue_url":"https://api.github.com/repos/mybatis/spring/issues/100","id":168929307,"user":{"login":"cwt9562","id":5601727,"avatar_url":"https://avatars.githubusercontent.com/u/5601727?v=3","gravatar_id":"","url":"https://api.github.com/users/cwt9562","html_url":"https://github.com/cwt9562","followers_url":"https://api.github.com/users/cwt9562/followers","following_url":"https://api.github.com/users/cwt9562/following{/other_user}","gists_url":"https://api.github.com/users/cwt9562/gists{/gist_id}","starred_url":"https://api.github.com/users/cwt9562/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cwt9562/subscriptions","organizations_url":"https://api.github.com/users/cwt9562/orgs","repos_url":"https://api.github.com/users/cwt9562/repos","events_url":"https://api.github.com/users/cwt9562/events{/privacy}","received_events_url":"https://api.github.com/users/cwt9562/received_events","type":"User","site_admin":false},"created_at":"2016-01-05T07:59:47Z","updated_at":"2016-01-05T07:59:47Z","body":"My config:\r\n\r\n@Configuration\r\npublic class MapperScannerConfig {\r\n\r\n    @Bean(name = \"mapperScannerConfigurer\")\r\n    public MapperScannerConfigurer mapperScannerConfigurer() throws Exception {\r\n        MapperScannerConfigurer mapperScannerConfigurer = new MapperScannerConfigurer();\r\n        mapperScannerConfigurer.setMarkerInterface(BaseMapper.class);\r\n        mapperScannerConfigurer.setSqlSessionFactoryBeanName(\"sqlSessionFactoryBean\");\r\n        mapperScannerConfigurer.setBasePackage(\"com.netdragon.resource.center\");\r\n        return mapperScannerConfigurer;\r\n    }\r\n\r\n    @Bean(name = \"simpleMapperScannerConfigurer\")\r\n    public MapperScannerConfigurer simpleMapperScannerConfigurer() throws Exception {\r\n        MapperScannerConfigurer mapperScannerConfigurer = new MapperScannerConfigurer();\r\n        mapperScannerConfigurer.setMarkerInterface(SimpleBaseMapper.class);\r\n        mapperScannerConfigurer.setSqlSessionFactoryBeanName(\"simpleSqlSessionFactoryBean\");\r\n        mapperScannerConfigurer.setBasePackage(\"com.netdragon.resource.center\");\r\n        return mapperScannerConfigurer;\r\n    }\r\n\r\n}"}}