spring.net错误排查 Error creating context 'spring.root': InputStream is null from Resource
2012-11-26 09:17
501 查看
在学习博主刘冬的内容时,想复现lesson_2的内容,写完后的代码调试总是遇到报:
Error creating context 'spring.root': InputStream is null from Resource = [assembly [Spring_2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null], resource [Spring_2.Objects.xml]]
经一天的思考与排查,我发现这是因为我没把“Objects.xml”的属性设为“生成嵌入的资源”,而是为vs2010预设的“内容”。
解决办法:
选中“Objects.xml”文件,再改变其“生成操作”属性为“生成嵌入的资源”。即可!
Error creating context 'spring.root': InputStream is null from Resource = [assembly [Spring_2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null], resource [Spring_2.Objects.xml]]
经一天的思考与排查,我发现这是因为我没把“Objects.xml”的属性设为“生成嵌入的资源”,而是为vs2010预设的“内容”。
解决办法:
选中“Objects.xml”文件,再改变其“生成操作”属性为“生成嵌入的资源”。即可!
![](https://oscdn.geek-share.com/Uploads/Images/Content/201910/12/c0ac937001b7429a2619b1ba23ac22c3.jpg)
相关文章推荐
- Error creating context 'spring.root': InputStream is null from Resource
- Spring.NET :Error creating context 'spring.root': InputStream is null from Resource 错误的解决方法
- Error creating bean with name 'userService': Injection of resource methods failed; nested exception is org.springframework.beans
- Spring异常:Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/classes/applicationContext.
- Error creating bean with name 'userService': Injection of resource methods failed; nested exception is org.springframework.beans
- Spring异常:Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF
- Spring Error creating bean with name 'sessionFactory ' defined in ServletContext resource [/WEB-INF/
- Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xm
- Error creating bean with name 'StuService' defined in ServletContext resource [/WEB-INF/applicationC
- Error creating bean with name 'sessionFactory' defined in ServletContext resource
- Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xm
- Error creating bean with name 'dataSource' defined in class path resource [applicationContext.xml]: Initialization of bean faile
- Error creating bean with name 'sqlSessionFactory' defined in ServletContext resource
- Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applica
- Error creating bean with name 'sessionFactory' defined in ServletContext resource
- Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xm
- Error creating bean with name 'dataSource' defined in ServletContext resource
- Error creating bean with name 'dwrSysuserDao' defined in ServletContext resource
- Error creating bean with name 'mySessionFactory' defined in class path resource [applicationContext.xml]:
- Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xm