[Solved] Error creating bean with name ‘sqlSessionFactory‘ defined in class path resource

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is
Could not resolve resource location pattern [classpath:com/test/mapper/*.xml]: class path resource [com/test/mapper/] cannot be resolved to URL because it does not exist
Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is Could not resolve resource location pattern [classpath:com/test/mapper/*.xml]: class path resource [com/test/mapper/] cannot be resolved to URL because it does not exist
Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is
Could not resolve resource location pattern [classpath:com/test/mapper/*.xml]: class path resource [com/test/mapper/] cannot be resolved to URL because it does not exist

 

Spring MVC error
When you encounter this error, put the entity class in src/main/java instead of src/test/java

Read More: