目錄
框架搭建
報(bào)文信息轉(zhuǎn)換器HttpMessageConverter
1.?@RequestBody注解
2. RequestEntity類型
3. @RequestBody注解(常用)
重點(diǎn):SpringMVC處理json
重點(diǎn):SpringMVC處理ajax
重點(diǎn):@RestController注解
4.?ResponseEntity(實(shí)現(xiàn)文件的上傳下載)
文件下載
文件上傳
圖書推薦《Spring Cloud 微服務(wù)快速上手》
框架搭建
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.example</groupId>
<artifactId>springmvc-thymeleaf006</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>springmvc-thymeleaf006 Maven Webapp</name>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>5.2.5.RELEASE</version>
</dependency>
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf-spring5</artifactId>
<version>3.0.10.RELEASE</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.2.3</version>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</build>
</project>
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
version="4.0">
<!--注冊(cè)過(guò)濾器:解決post請(qǐng)求亂碼問(wèn)題-->
<filter>
<filter-name>encode</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>
<!--強(qiáng)制request使用字符集encoding-->
<init-param>
<param-name>forceRequestEncoding</param-name>
<param-value>true</param-value>
</init-param>
<!--強(qiáng)制response使用字符集encoding-->
<init-param>
<param-name>forceResponseEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<!--所有請(qǐng)求-->
<filter-mapping>
<filter-name>encode</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!--發(fā)送put、delete請(qǐng)求方式的過(guò)濾器-->
<filter>
<filter-name>HiddenHttpMethodFilter</filter-name>
<filter-class>org.springframework.web.filter.HiddenHttpMethodFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>HiddenHttpMethodFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!--注冊(cè)SpringMVC框架-->
<servlet>
<servlet-name>springmvc</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<!--配置springMVC位置文件的位置和名稱-->
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:springmvc.xml</param-value>
</init-param>
<!--將前端控制器DispatcherServlet的初始化時(shí)間提前到服務(wù)器啟動(dòng)時(shí)-->
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>springmvc</servlet-name>
<!--指定攔截什么樣的請(qǐng)求
例如:http://localhost:8080/demo.action
-->
<url-pattern>/</url-pattern>
</servlet-mapping>
</web-app>
springmvc.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/mvc https://www.springframework.org/schema/mvc/spring-mvc.xsd">
<!--配置包掃描-->
<context:component-scan base-package="com.zl.controller"/>
<!--視圖控制器,需要搭配注解驅(qū)動(dòng)使用-->
<mvc:view-controller path="/" view-name="index"/>
<!--專門處理ajax請(qǐng)求,ajax請(qǐng)求不需要視圖解析器InternalResourceViewResolver-->
<!--但是需要添加注解驅(qū)動(dòng),專門用來(lái)解析@ResponseBody注解的-->
<!--注入date類型時(shí),需要使用@DateTimeFormat注解,也要搭配這個(gè)使用-->
<mvc:annotation-driven/>
<!--開(kāi)放對(duì)靜態(tài)資源的訪問(wèn),需要搭配注解驅(qū)動(dòng)使用-->
<mvc:default-servlet-handler/>
<!-- 配置Thymeleaf視圖解析器 -->
<bean id="viewResolver" class="org.thymeleaf.spring5.view.ThymeleafViewResolver">
<property name="order" value="1"/>
<property name="characterEncoding" value="UTF-8"/>
<property name="templateEngine">
<bean class="org.thymeleaf.spring5.SpringTemplateEngine">
<property name="templateResolver">
<bean class="org.thymeleaf.spring5.templateresolver.SpringResourceTemplateResolver">
<!-- 視圖前綴 -->
<property name="prefix" value="/WEB-INF/templates/"/>
<!-- 視圖后綴 -->
<property name="suffix" value=".html"/>
<property name="templateMode" value="HTML5"/>
<property name="characterEncoding" value="UTF-8"/>
</bean>
</property>
</bean>
</property>
</bean>
</beans>
報(bào)文信息轉(zhuǎn)換器HttpMessageConverter
(1)HttpMessageConverter,報(bào)文信息轉(zhuǎn)換器,將請(qǐng)求報(bào)文轉(zhuǎn)換為Java對(duì)象,或?qū)ava對(duì)象轉(zhuǎn)換為響應(yīng)報(bào)文。
(2)HttpMessageConverter提供了兩個(gè)注解和兩個(gè)類型:@RequestBody、@ResponseBody、RequestEntity、ResponseEntity!
1.?@RequestBody注解
@RequestBody可以獲取請(qǐng)求體,需要在控制器方法設(shè)置一個(gè)形參,使用@RequestBody進(jìn)行標(biāo)識(shí),當(dāng)前請(qǐng)求的請(qǐng)求體就會(huì)為當(dāng)前注解所標(biāo)識(shí)的形參賦值!?
回顧:請(qǐng)求報(bào)文有三個(gè)部分組成:請(qǐng)求頭、請(qǐng)求空行、請(qǐng)求體;對(duì)于Get請(qǐng)求沒(méi)有請(qǐng)求體,只有Post請(qǐng)求才有請(qǐng)求體。因?yàn)镚et請(qǐng)求會(huì)把請(qǐng)求參數(shù)拼接到地址欄,而Post請(qǐng)求則是放到請(qǐng)求體當(dāng)中!
form表單提交數(shù)據(jù)
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>首頁(yè)</title>
</head>
<body>
<form th:action="@{/testRequestBody}" method="post">
用戶名:<input type="text" name="username"><br>
密碼:<input type="password" name="password"><br>
<input type="submit" value="測(cè)試@RequestBody注解">
</form>
</body>
</html>
controller獲取到請(qǐng)求體
package com.zl.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class HttpMessageConverterController {
@RequestMapping("/testRequestBody")
public String testRequestBody(@RequestBody String requestBody){
System.out.println("requestBody:"+requestBody);
return "success";
}
}
執(zhí)行結(jié)果
注:如果沒(méi)有使用@RequestBody注解拿到的就是一個(gè)null!?
2. RequestEntity類型
RequestEntity封裝請(qǐng)求報(bào)文的一種類型,也是需要在控制器方法的形參中設(shè)置該類型的形參,當(dāng)前請(qǐng)求的請(qǐng)求報(bào)文就會(huì)賦值給該形參,可以通過(guò)getHeaders()獲取請(qǐng)求頭信息,通過(guò)getBody()獲取請(qǐng)求體信息。
注:@RequestBody注解只是獲取請(qǐng)求體信息,而RequestEntity可以獲取整個(gè)請(qǐng)求信息!
form表單提交數(shù)據(jù)
<form th:action="@{/testRequestEntity}" method="post">
用戶名:<input type="text" name="username"><br>
密碼:<input type="password" name="password"><br>
<input type="submit" value="測(cè)試RequestEntity"><br>
</form>
controller獲取到請(qǐng)求體
@RequestMapping("/testRequestEntity")
public String testRequestEntity(RequestEntity<String> requestEntity){
// 獲取請(qǐng)求頭
System.out.println("requestHeader:"+requestEntity.getHeaders());
// 獲取請(qǐng)求體
System.out.println("requestBody:"+requestEntity.getBody());
return "success";
}
執(zhí)行結(jié)果
3. @RequestBody注解(常用)
@ResponseBody用于標(biāo)識(shí)一個(gè)控制器方法上,可以將該方法的返回值直接作為響應(yīng)報(bào)文的響應(yīng)體響應(yīng)到瀏覽器!?
回顧:以前使用原生的ServletAPI響應(yīng)數(shù)據(jù)到瀏覽器
前端發(fā)出請(qǐng)求
<a th:href="@{/testServletAPI}">使用原生的ServletAPI響應(yīng)數(shù)據(jù)到瀏覽器</a>
controller獲取到請(qǐng)求,相應(yīng)數(shù)據(jù)到瀏覽器
@RequestMapping("/testServletAPI")
public void testServletAPI(HttpServletResponse response) throws IOException {
// 調(diào)用getWriter方法獲取到一個(gè)流
PrintWriter out = response.getWriter();
// 響應(yīng)到瀏覽器
out.println("Hello,Response");
}
執(zhí)行結(jié)果
現(xiàn)在:使用@ResponseBody注解響應(yīng)數(shù)據(jù)到瀏覽器
前端發(fā)出請(qǐng)求
<a th:href="@{/testResponseBody}">使用@RequestBody注解響應(yīng)數(shù)據(jù)到瀏覽器</a>
controller獲取到請(qǐng)求,相應(yīng)數(shù)據(jù)到瀏覽器
注:如果沒(méi)有使用@ResponseBody注解,此時(shí)返回的success就會(huì)被當(dāng)做視圖名稱被前端控制器加上前綴和后綴進(jìn)行進(jìn)行頁(yè)面的跳轉(zhuǎn)。如果加上@ResponseBody注解,此時(shí)返回的值就不會(huì)當(dāng)做視圖名稱,而是當(dāng)前響應(yīng)體!
@RequestMapping("/testResponseBody")
@ResponseBody
public String testRequestBody(){
return "success..........";
}
執(zhí)行結(jié)果
重點(diǎn):SpringMVC處理json
瀏覽器是只能識(shí)別字符串的,那么假如我們返回的是一個(gè)Java對(duì)象呢?此時(shí)瀏覽器就無(wú)法識(shí)別報(bào)錯(cuò)!怎么解決?轉(zhuǎn)換成Json格式的數(shù)據(jù)!
User對(duì)象
package com.zl.bean;
import java.time.Period;
public class User {
private String name;
private Integer age;
private String sex;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getAge() {
return age;
}
public void setAge(Integer age) {
this.age = age;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
public User() {
}
public User(String name, Integer age, String sex) {
this.name = name;
this.age = age;
this.sex = sex;
}
}
返回一個(gè)User對(duì)象
@RequestMapping("/testResponseUser")
@ResponseBody
public User testResponseUser(){
return new User("張三",18,"男");
}
執(zhí)行結(jié)果:無(wú)法響應(yīng)Java對(duì)象
@ResponseBody處理json的步驟?
①導(dǎo)入jackson的依賴
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.12.1</version>
</dependency>
②在SpringMVC的核心配置文件中開(kāi)啟mvc的注解驅(qū)動(dòng)
注解驅(qū)動(dòng)<mvc:annotation-driven/>:專門用來(lái)解析@ResponseBody注解的;此時(shí)在HandlerAdaptor中會(huì)自動(dòng)裝配一個(gè)消息轉(zhuǎn)換器:MappingJackson2HttpMessageConverter,可以將響應(yīng)到瀏覽器的Java對(duì)象轉(zhuǎn)換為Json格式的字符串。
<mvc:annotation-driven/>
③在處理器方法上使用@ResponseBody注解進(jìn)行標(biāo)識(shí);此時(shí)將Java對(duì)象直接作為控制器方法的返回值返回,就會(huì)自動(dòng)轉(zhuǎn)換為Json格式的字符串
@RequestMapping("/testResponseUser")
@ResponseBody
public User testResponseUser(){
return new User("張三",18,"男");
}
執(zhí)行結(jié)果:把Java對(duì)象轉(zhuǎn)換成Json格式的字符串顯示到瀏覽器上
注:Json實(shí)際上有兩種格式,使用大括號(hào){}就是Json對(duì)象、使用方括號(hào)[]就是Json數(shù)組!對(duì)于對(duì)象我們使用 點(diǎn) 的方式進(jìn)行訪問(wèn),對(duì)于數(shù)組我們通過(guò)遍歷的方式進(jìn)行訪問(wèn)。例如:Java對(duì)象、Map集合轉(zhuǎn)化成Json都是對(duì)象的形式存在、List集合轉(zhuǎn)換成Json是以數(shù)組的方式存在。
注:實(shí)際上只增加了一個(gè)jackson的依賴就可以了,因?yàn)樽⒔怛?qū)動(dòng)前面很多地方都用到,例如:視圖控制器、處理靜態(tài)資源,上來(lái)就配置上了;而@Response注解是我們一直要用的。
重點(diǎn):SpringMVC處理ajax
使用Vue發(fā)送ajax請(qǐng)求,需要引入兩個(gè)庫(kù):
發(fā)送Ajax請(qǐng)求
注:這里ajax發(fā)送請(qǐng)求的導(dǎo)入庫(kù)的時(shí)候:<script></script>不能寫成<script />
<div id="app">
<a @click="textAxios" th:href="@{/textAxios}">SpringMVC發(fā)送ajax請(qǐng)求</a>
</div>
<!--導(dǎo)入庫(kù),不能直接斜杠結(jié)尾,必須使用</script>才可以-->
<script type="text/javascript" th:src="@{/static/js/vue.js}" ></script>
<script type="text/javascript" th:src="@{/static/js/axios.min.js}" ></script>
<!--編寫-->
<script type="text/javascript">
new Vue({
// 綁定容器
el:"#app",
// 觸發(fā)事件
methods:{
// 發(fā)送ajax請(qǐng)求
textAxios:function(event){
// ajax請(qǐng)求
axios({
method:"post",
url:event.target.href,
params:{
username:"admin",
password:"123"
}
}).then(function (response){ // 就相當(dāng)于使用ajax的回調(diào)函數(shù)
alert(response.data);
});
// 取消超鏈接的默認(rèn)行為
event.preventDefault();
}
}
});
</script>
控制器方法
@RequestMapping("/textAxios")
@ResponseBody
public String testAjax(String username,String password){
System.out.println("username:"+username+",password:"+password);
return username+","+password;
}
執(zhí)行結(jié)果:成功拿到ajax發(fā)送的數(shù)據(jù),并且不會(huì)頁(yè)面跳轉(zhuǎn)
重點(diǎn):@RestController注解
@RestController注解是springMVC提供的一個(gè)復(fù)合注解,標(biāo)識(shí)在控制器的類上,就相當(dāng)于為類添加了@Controller注解,并且為其中的每個(gè)方法添加了@ResponseBody注解。
4.?ResponseEntity(實(shí)現(xiàn)文件的上傳下載)
ResponseEntity用于控制器方法的返回值類型,該控制器方法的返回值就是響應(yīng)到瀏覽器的響應(yīng)報(bào)文 !
注:使用ResponseEntity實(shí)現(xiàn)下載文件的功能!
文件下載
前端發(fā)出請(qǐng)求
<!--文件下載-->
<a th:href="@{/testDown}">下載1.jpg</a>
后端處理
第一步:創(chuàng)建一個(gè)方法,方法的返回值就是ResponseEntity類型,方法的參數(shù)就是HttpSession對(duì)象。
第二步:根據(jù)session對(duì)象獲取到上下文對(duì)象applocation對(duì)象,然后調(diào)用application對(duì)象的getRealPath方法,獲取到在該項(xiàng)目中的文件的真實(shí)路徑。
第三步:根據(jù)這個(gè)真實(shí)路徑創(chuàng)建一個(gè)IO輸入流去讀取數(shù)據(jù);并創(chuàng)建一個(gè)byte數(shù)組,參數(shù)是is.avaliavle()表示獲取該文件的所有字節(jié),這樣就不要循環(huán)了;調(diào)用read方法進(jìn)行讀取,返回的是讀取到字節(jié)的數(shù)量,將流讀取到字節(jié)數(shù)組中去。
第四步:創(chuàng)建響應(yīng)頭信息HttpHeaders對(duì)象,并調(diào)用add方法設(shè)置下載的方式以及文件的名字
第五步:設(shè)置響應(yīng)狀態(tài)碼。
第六步:創(chuàng)建ResponseEntity對(duì)象,參數(shù)有三個(gè):響應(yīng)體、響應(yīng)頭、狀態(tài)碼。
第七步:關(guān)閉IO流,返回ResponseEntity對(duì)象。
@Controller
public class FileUpAndDownController {
@RequestMapping("/testDown")
// 方法的返回值就是ResponseEntity類型
public ResponseEntity<byte[]> testResponseEntity(HttpSession session) throws IOException {
//獲取ServletContext上下文對(duì)象
ServletContext application = session.getServletContext();
//獲取服務(wù)器中文件的真實(shí)路徑
String realPath = application.getRealPath("/static/img/1.jpg");
//創(chuàng)建輸入流
InputStream is = new FileInputStream(realPath);
//創(chuàng)建字節(jié)數(shù)組
byte[] bytes = new byte[is.available()];
//將流讀到字節(jié)數(shù)組中
is.read(bytes);
//創(chuàng)建HttpHeaders對(duì)象設(shè)置響應(yīng)頭信息
MultiValueMap<String, String> headers = new HttpHeaders();
//設(shè)置要下載方式以及下載文件的名字(固定的)
headers.add("Content-Disposition", "attachment;filename=1.jpg");
//設(shè)置響應(yīng)狀態(tài)碼
HttpStatus statusCode = HttpStatus.OK;
//創(chuàng)建ResponseEntity對(duì)象(響應(yīng)體、響應(yīng)頭、狀態(tài)碼)
ResponseEntity<byte[]> responseEntity = new ResponseEntity<>(bytes, headers, statusCode);
//關(guān)閉輸入流
is.close();
return responseEntity;
}
}
執(zhí)行結(jié)果
文件上傳
(1)文件上傳要求form表單的請(qǐng)求方式必須為post,并且添加屬性enctype="multipart/form-data"。默認(rèn)這個(gè)值等于enctype="application/x-www-form-urlencoded",表示key=value的方式傳輸;設(shè)置成enctype="multipart/form-data",此時(shí)就是以二進(jìn)制的方式傳輸。
(2)SpringMVC中將上傳的文件封裝到MultipartFile對(duì)象中,通過(guò)此對(duì)象可以獲取文件相關(guān)信息。
前端發(fā)出請(qǐng)求
<!--文件上傳-->
<form th:action="@{/testUp}" method="post" enctype="multipart/form-data">
頭像:<input type="file" name="photo"><br>
<input type="submit" value="上傳">
</form>
a>添加依賴
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.1</version>
</dependency>
b>在springmvc.xml的配置文件中添加配置
注:SpringMVC是根據(jù)id獲取這個(gè)Bean的,并且這個(gè)id必須叫multipartResolver!實(shí)際上我們需要的是MultipartResolver對(duì)象,但它是一個(gè)接口,所以就使用了它的實(shí)現(xiàn)類CommonsMultipartResolver對(duì)象。
<!--必須通過(guò)文件解析器的解析才能將文件轉(zhuǎn)換為MultipartFile對(duì)象-->
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"></bean>
c>控制器方法
注:把上傳的對(duì)象封裝到MultipartFile對(duì)象當(dāng)中去!
第一步:通過(guò)前面的CommonsMultipartResolver把傳過(guò)來(lái)的photo轉(zhuǎn)換成MultipartFile對(duì)象。
第二步:調(diào)用getOriginalFilename獲取上傳的文件名,例如:1.jpg。
第三步:解決文件重名問(wèn)題,首先通過(guò)截取,獲得文件的后綴;然后調(diào)用UUID.randomUUID().toString()方法獲取一個(gè)32位的UUID,與得到的后綴名拼接一起。
第四步:通過(guò)session對(duì)象獲取到application對(duì)象,調(diào)用方法獲取一個(gè)目錄的路徑;如果還要判斷這個(gè)目錄是否存在,如果不存在就創(chuàng)建。
第五步:拼接一個(gè)新的目錄:目錄路徑+分隔符+文件名。
第六步:調(diào)用transferTo方法實(shí)現(xiàn)上傳功能。
@RequestMapping("/testUp")
public String testUp(MultipartFile photo, HttpSession session) throws IOException {
//獲取上傳的文件的文件名
String fileName = photo.getOriginalFilename();
//處理文件重名問(wèn)題
String hzName = fileName.substring(fileName.lastIndexOf("."));
fileName = UUID.randomUUID().toString() + hzName;
//獲取服務(wù)器中photo目錄的路徑
ServletContext application = session.getServletContext();
String photoPath = application.getRealPath("photo"); // 設(shè)置上傳的位置,就是webapp下的photo
// 創(chuàng)建目錄(沒(méi)有就創(chuàng)建)
File file = new File(photoPath);
if(!file.exists()){
file.mkdir();
}
// 真正的路徑:目錄+分隔符+文件名
String finalPath = photoPath + File.separator + fileName;
//實(shí)現(xiàn)上傳功能
photo.transferTo(new File(finalPath));
return "success";
}
執(zhí)行結(jié)果
圖書推薦《Spring Cloud 微服務(wù)快速上手》
參與方式:
本次送書 2?本!?
活動(dòng)時(shí)間:截止到 2023-06-15?00:00:00。抽獎(jiǎng)方式:利用程序進(jìn)行抽獎(jiǎng)。
參與方式:關(guān)注博主(只限粉絲福利哦)、點(diǎn)贊、收藏,評(píng)論區(qū)隨機(jī)抽取,最多三條評(píng)論!
其它圖書詳情了解:IT BOOK 多得?文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-480706.html
文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-480706.html
到了這里,關(guān)于【SpringMVC】| 報(bào)文信息轉(zhuǎn)換器HttpMessageConverter的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!