10 2021 档案
springMVC基础知识
摘要:1.@Controller 标注在类定义前,表示该类为一个控制器。 该注解有一个value参数,表示该控制器的名称。 比较典型的用法是配合@RequestMapping注解一起使用。 @Controller @RequestMapping(value="/index") public class H 阅读全文
posted @ 2021-10-09 11:27 pcant 阅读(61) 评论(0) 推荐(0)
spring MVC请求路径设置
摘要:1.spring MVC支持的ant风格的路径 ?:表示任意的单个字符 如:@RequestMapping("/test?/hello") *:表示任意的0个或多个字符 如:@RequestMapping("/test*/hello") **:表示任意的一层或多层目录 如:@RequestMappi 阅读全文
posted @ 2021-10-09 00:45 pcant 阅读(623) 评论(0) 推荐(0)
spring boot MVC配置
摘要:https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#features.developing-web-applications.spring-mvc Spring Boot provides auto-config 阅读全文
posted @ 2021-10-08 18:00 pcant 阅读(343) 评论(0) 推荐(0)
spring以及spring boot参数配置
摘要:1.@PropertySource注解 Annotation providing a convenient and declarative mechanism for adding a org.springframework.core.env.PropertySource to Spring's o 阅读全文
posted @ 2021-10-03 15:44 pcant 阅读(139) 评论(0) 推荐(0)
mybatis使用-整合到spring构架
摘要:二、将mybatis整合到spring框架中 参照mybatis官方文档:http://mybatis.org/spring/zh/getting-started.html 官方文档介绍中,对Mapper的注入使用的是xml配置文件,本文使用的java代码配置实现。 代码结构: 1.使用eclips 阅读全文
posted @ 2021-10-02 10:07 pcant 阅读(136) 评论(0) 推荐(0)
mybatis的使用-单独使用mybatis
摘要:一、单独使用mybatis 参照mybatis官方文档 https://mybatis.org/mybatis-3/zh/getting-started.html 整体代码结构: 1.使用eclipse新建一个maven项目,将项目的java编译器版本修改为1.8。 或者通过修改pom.xml文件, 阅读全文
posted @ 2021-10-02 00:04 pcant 阅读(621) 评论(0) 推荐(0)