上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 24 下一页
摘要: 1.用了@autowired注解后不用写setter方法了 2.中文乱码的问题 阅读全文
posted @ 2022-01-18 17:29 卡卡发 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 1.注解@Autowired @Qualifier 2.前端页面编写 3.web.xml中DispatcherServlet的绑定的配置文件为spring的总配置文件 4.找不到数据库资源,配置中的classpath路径问题 阅读全文
posted @ 2022-01-18 09:26 卡卡发 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 1.spring-mvc.xml:注解驱动,component-scan扫描controller包,配置视图解析器。 2.spring-mvc.xml整合到applicatContext.xml。 3.web.xml:配置DispatcherServlet,配置乱码过滤 阅读全文
posted @ 2022-01-17 17:02 卡卡发 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 1.spring-mapper.xml:配置datasource,sqlSessionFactory,配置mapper接口扫描包(目的是动态注入到spring)。 2.spring-service.xml:component-scan用注解来发,将所有的业务类注入到spring,配置声明式事务。 3.将两个配置文件整合到applicationContext.xml中 阅读全文
posted @ 2022-01-17 16:47 卡卡发 阅读(26) 评论(0) 推荐(0) 编辑
摘要: 1.数据库key创建索引; 2.pojo,mapper(mapper.xml映射),service(service实现类); 3.编写properties文件(在spring配置文件配置数据源),mybatis配置文件配置别名和mapper注册 阅读全文
posted @ 2022-01-14 17:19 卡卡发 阅读(56) 评论(0) 推荐(0) 编辑
摘要: 阿里开发的工具包 阅读全文
posted @ 2022-01-14 14:50 卡卡发 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 1.@Controller 这个注解会走视图解析器; 2.@ResponseBody 这个注解,则这个方法就不会走视图解析器,会直接返回一个字符串; 3.用@RestController来代替@Controller加@ResponseBody的功能 4.json乱码问题配置 5.创建一个JSON工具类,提取公共部分 阅读全文
posted @ 2022-01-14 14:35 卡卡发 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 重定向redirect不需要视图解析器;因为重定向是request请求,因此不能访问WEB-INF目录 阅读全文
posted @ 2022-01-14 09:41 卡卡发 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 1.简化URL 2.实现请求地址一样,请求方式不同 阅读全文
posted @ 2022-01-14 09:27 卡卡发 阅读(20) 评论(0) 推荐(0) 编辑
摘要: web.xml中配置DispatcherServlet; @Controller这个注解会走视图解析器; @RequestMapping; 阅读全文
posted @ 2022-01-13 17:17 卡卡发 阅读(33) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 24 下一页