spring
悦&@
@@@@
展开
-
《Spring实战》读书笔记——Spring自动化配置
一、自动化装配bean实现自动化装配的两步骤:(1)组件扫描(component scanning):Spring会自动发现应用上下文中所创建的bean。(2)自动装配(autowiring):Spring自动满足bean之间的依赖关系。1:创建可被发现的bean首先定义一个接口CompactDisc:package soundsystem;public interface CompactDi...原创 2018-05-01 22:14:07 · 210 阅读 · 0 评论 -
idea中Web项目 class path resource [applicationContext.xml] cannot be opened because it does not exist
常见原因有二:1.web.xml配置不正确。 2:build project工程后没有将资源文件resources下的配置文件拷贝到out目录下面的classes目录下。解决原因2的步骤如下:1)首先我的目录为src/main/目录如下图: (spring的配置文件放在了:资源文件夹resources下spring文件夹下)2)我的web.xml配置如下图:3)打开File->Proje...原创 2018-05-26 23:16:05 · 56397 阅读 · 53 评论 -
idea中spring-mybatis.xml文件Cannot resolve file 'userMapper.xml' annot resolve file 'userMapper.xml' 问题
原因:<property name="mapperLocations" value="classpath:com/ssm/mapper/userMapper.xml"/>中value配置路径出错。首先,userMapper.xml文件确实在resources文件夹下的com.ssm.mapper中:所以,在idea中,value应该配为:value="classpath:com.ssm...原创 2018-05-27 11:12:53 · 9046 阅读 · 0 评论