春季休息模板引发了以下异常
org.springframework.web.client.RestClientException: Could not extract response: no suitable HttpMessageConverter found for response type [class [Lcom.flightsms.core.dto.AirlineResponseDTO;] and content type [text/html;charset=UTF-8]
Run Code Online (Sandbox Code Playgroud)
这是我的 json 响应
[
{
"airlineId": "1",
"nameAirline": "American Airlines",
"codeIataAirline": "AA",
"iataPrefixAccounting": "1",
"codeIcaoAirline": "AAL",
"callsign": "AMERICAN",
"type": "scheduled",
"statusAirline": "active",
"sizeAirline": "963",
"ageFleet": "10.9",
"founding": "1934",
"codeHub": "DFW",
"nameCountry": "United States",
"codeIso2Country": "US"
}
]
Run Code Online (Sandbox Code Playgroud)
dto类
@Data
public class AirlineResponseDTO {
private String airlineId;
private String nameAirline;
private String codeIataAirline;
private String iataPrefixAccounting;
private String codeIcaoAirline;
private String callsign; …Run Code Online (Sandbox Code Playgroud) SimpleDateFormat sdf = new SimpleDateFormat("MMM dd, YYYY, EEE", Locale.US);
System.out.println(sdf.format(new Date()));
System.out.println(sdf.format(sdf.parse("Apr 27, 2018, Fri")));
Run Code Online (Sandbox Code Playgroud)
Java不会按预期解析日期并输出:
Apr 27, 2018, Fri
Jan 05, 2018, Fri // I can not understand why java parse the month of April as January
Run Code Online (Sandbox Code Playgroud) 我有一个面板,例如myPanel,当我想将它插入HTML标记时,我必须编写
<div wicket:panel="mypanel"/> or <span wicket:panel="mypanel"/>
Run Code Online (Sandbox Code Playgroud)
在Html输出中,我的面板转向div或span标签.有可能以某种方式将面板嵌入HTML标记而不使用html标记,例如
<wicket:child/>
Run Code Online (Sandbox Code Playgroud)