1、 @RequestMapping("/find") 请求路径,方法的返回值默认String,return"路径"
2、 @ResponseBody //把返回值类型转换成json字符串
3、 @RestController //ResponseBody 和Controller 的结合
4、 @Resource //ByName装配 解耦好
@Autowired //ByType装配 兼容性好,多数用
@Qualifier(value="customerServiceImpl") //和Autowired组合用,把Autowired转换成 ByName
5、 Model model
model.addAttribute("customer",customer);//请求和转发都可用
传过来的参数和customer属性相同,自动封装
6、 @RequestMapping("/delete/{cid}")
(@PathVariable Integer cid)路径要带参数
<!-- 过滤器 --> web.xml
<filter>
<filter-name>code</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>code</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
maven、
一、maven 管理工具的作用:
管理jar包:自动下载
项目构建:clean -- 编译 -- 测试 -- 安装 -- 部署 -- 发布
二、maven三大仓库
本地库、私有库 、中央仓库
三、确定maven
坐标:组id、支持id、版本号、