2022年12月29日

Springoot - 整合MyBatis

摘要: 1.导入JDBC驱动 因为我的是Mysql数据库 版本是8.0.20 导入对应版本的驱动即可 <!--mysql 依赖--> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <ve 阅读全文

posted @ 2022-12-29 19:15 Mikasa-Ackerman 阅读(25) 评论(0) 推荐(0) 编辑

SpringBoot - WebMvcConfigurer 配置类

摘要: WebMvcConfigurer: 1.public void configurePathMatch(PathMatchConfigurer configurer) 路径匹配规则 一般不用修改 2.public void configureContentNegotiation(ContentNego 阅读全文

posted @ 2022-12-29 18:20 Mikasa-Ackerman 阅读(54) 评论(0) 推荐(0) 编辑

SpringBoot - 内容协商机制

摘要: 1.内容协商机制 根据客户端接收能力不同,SpringBoot 返回不同媒体类型的数据 比如: 客户端 Http 请求 Accept: application/xml 则返回 xml 数据,客户端 Http 请求 Accept: application/json 则返回 json 数据 Spring 阅读全文

posted @ 2022-12-29 17:09 Mikasa-Ackerman 阅读(123) 评论(0) 推荐(0) 编辑

导航