update Java jersey 1,2 to handle */*

This commit is contained in:
wing328
2017-07-31 13:26:56 +08:00
parent 182807ed9a
commit fab49e80a8
11 changed files with 24 additions and 11 deletions

View File

@@ -247,7 +247,7 @@
</dependencies>
<properties>
<swagger-core-version>1.5.15</swagger-core-version>
<jersey-version>2.25.1</jersey-version>
<jersey-version>2.6</jersey-version>
<commons_io_version>2.5</commons_io_version>
<commons_lang3_version>3.6</commons_lang3_version>
<jackson-version>2.6.4</jackson-version>

View File

@@ -434,12 +434,13 @@ public class ApiClient {
* application/json; charset=UTF8
* APPLICATION/JSON
* application/vnd.company+json
* "* / *" is also default to JSON
* @param mime MIME
* @return True if the MIME type is JSON
*/
public boolean isJsonMime(String mime) {
String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$";
return mime != null && (mime.matches(jsonMime) || mime.equalsIgnoreCase("application/json-patch+json"));
return mime != null && (mime.matches(jsonMime) || mime.equals("*/*"));
}
/**

View File

@@ -39,7 +39,7 @@ public class Cat extends Animal {
* @return declawed
**/
@ApiModelProperty(value = "")
public Boolean getDeclawed() {
public Boolean isDeclawed() {
return declawed;
}

View File

@@ -181,7 +181,7 @@ public class Order {
* @return complete
**/
@ApiModelProperty(value = "")
public Boolean getComplete() {
public Boolean isComplete() {
return complete;
}