Skip to content

Commit 3483389

Browse files
committed
upgrade to spring-boot 2.6.0
1 parent a98114b commit 3483389

File tree

15 files changed

+32
-30
lines changed

15 files changed

+32
-30
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<parent>
1212
<groupId>org.springframework.boot</groupId>
1313
<artifactId>spring-boot-starter-parent</artifactId>
14-
<version>2.5.5</version>
14+
<version>2.6.0</version>
1515
</parent>
1616

1717
<licenses>

springdoc-openapi-data-rest/src/test/java/test/org/springdoc/api/app4/EmployeeController.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ class EmployeeController {
6060
ResponseEntity<CollectionModel<EntityModel<Employee>>> findAll() {
6161

6262
List<EntityModel<Employee>> employees = StreamSupport.stream(repository.findAll().spliterator(), false)
63-
.map(employee -> new EntityModel<>(employee, //
63+
.map(employee -> EntityModel.of(employee, //
6464
linkTo(methodOn(EmployeeController.class).findOne(employee.getId())).withSelfRel(), //
6565
linkTo(methodOn(EmployeeController.class).findAll()).withRel("employees"))) //
6666
.collect(Collectors.toList());
6767

6868
return ResponseEntity.ok( //
69-
new CollectionModel<>(employees, //
69+
CollectionModel.of(employees, //
7070
linkTo(methodOn(EmployeeController.class).findAll()).withSelfRel()));
7171
}
7272

@@ -76,7 +76,7 @@ ResponseEntity<EntityModel<Employee>> newEmployee(@RequestBody Employee employee
7676
try {
7777
Employee savedEmployee = repository.save(employee);
7878

79-
EntityModel<Employee> employeeResource = new EntityModel<>(savedEmployee, //
79+
EntityModel<Employee> employeeResource = EntityModel.of(savedEmployee, //
8080
linkTo(methodOn(EmployeeController.class).findOne(savedEmployee.getId())).withSelfRel());
8181

8282
return ResponseEntity //
@@ -98,7 +98,7 @@ ResponseEntity<EntityModel<Employee>> newEmployee(@RequestBody Employee employee
9898
ResponseEntity<EntityModel<Employee>> findOne(@PathVariable long id) {
9999

100100
return repository.findById(id) //
101-
.map(employee -> new EntityModel<>(employee, //
101+
.map(employee -> EntityModel.of(employee, //
102102
linkTo(methodOn(EmployeeController.class).findOne(employee.getId())).withSelfRel(), //
103103
linkTo(methodOn(EmployeeController.class).findAll()).withRel("employees"))) //
104104
.map(ResponseEntity::ok) //

springdoc-openapi-data-rest/src/test/java/test/org/springdoc/api/app8/AlbumModelAssembler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class AlbumModelAssembler implements RepresentationModelAssembler<Album,
1414
@Override
1515
public EntityModel<Album> toModel(Album entity) {
1616
List<Link> links = new ArrayList<>();
17-
return new EntityModel<>(entity, links);
17+
return EntityModel.of(entity, links);
1818
}
1919

2020
}

springdoc-openapi-data-rest/src/test/java/test/org/springdoc/api/app9/component/controller/ComponentsController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public ResponseEntity<EntityModel<DemoComponentDto>> findById(@PathVariable Stri
6868
Optional<DemoComponent> foundComponent = componentsService.findById(componentId);
6969

7070
if (foundComponent.isPresent()) {
71-
return ResponseEntity.ok(new EntityModel<>(toDtoConverter.convert(foundComponent.get()), //
71+
return ResponseEntity.ok( EntityModel.of(toDtoConverter.convert(foundComponent.get()), //
7272
linkTo(methodOn(ComponentsController.class).findAll(null)).withRel("components")));
7373
}
7474

springdoc-openapi-data-rest/src/test/java/test/org/springdoc/api/app9/component/controller/hateoas/ComponentDtoModelAssembler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class ComponentDtoModelAssembler implements RepresentationModelAssembler<
2121

2222
@Override
2323
public RepresentationModel<EntityModel<DemoComponentDto>> toModel(DemoComponent entity) {
24-
return new EntityModel<DemoComponentDto>(toDtoConverter.convert(entity));
24+
return EntityModel.of(toDtoConverter.convert(entity));
2525
}
2626

2727
}

springdoc-openapi-data-rest/src/test/resources/results/app18.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
}
1212
],
1313
"paths": {
14-
"/v1/helloWorld/helloWorld": {
14+
"/latest/helloWorld/helloWorld": {
1515
"get": {
1616
"tags": [
1717
"hello-controller"
@@ -55,7 +55,7 @@
5555
}
5656
}
5757
},
58-
"/latest/helloWorld/helloWorld": {
58+
"/v1/helloWorld/helloWorld": {
5959
"get": {
6060
"tags": [
6161
"hello-controller"
@@ -120,4 +120,4 @@
120120
}
121121
}
122122
}
123-
}
123+
}

springdoc-openapi-hateoas/src/test/java/test/org/springdoc/api/app1/EmployeeController.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ class EmployeeController {
6262
ResponseEntity<CollectionModel<EntityModel<Employee>>> findAll() {
6363

6464
List<EntityModel<Employee>> employees = StreamSupport.stream(repository.findAll().spliterator(), false)
65-
.map(employee -> new EntityModel<>(employee, //
65+
.map(employee -> EntityModel.of(employee, //
6666
linkTo(methodOn(EmployeeController.class).findOne(employee.getId())).withSelfRel(), //
6767
linkTo(methodOn(EmployeeController.class).findAll()).withRel("employees"))) //
6868
.collect(Collectors.toList());
6969

7070
return ResponseEntity.ok( //
71-
new CollectionModel<>(employees, //
71+
CollectionModel.of(employees, //
7272
linkTo(methodOn(EmployeeController.class).findAll()).withSelfRel()));
7373
}
7474

@@ -79,7 +79,7 @@ ResponseEntity<EntityModel<Employee>> newEmployee(@RequestBody Employee employee
7979
try {
8080
Employee savedEmployee = repository.save(employee);
8181

82-
EntityModel<Employee> employeeResource = new EntityModel<>(savedEmployee, //
82+
EntityModel<Employee> employeeResource = EntityModel.of(savedEmployee, //
8383
linkTo(methodOn(EmployeeController.class).findOne(savedEmployee.getId())).withSelfRel());
8484

8585
return ResponseEntity //
@@ -101,7 +101,7 @@ ResponseEntity<EntityModel<Employee>> newEmployee(@RequestBody Employee employee
101101
ResponseEntity<EntityModel<Employee>> findOne(@PathVariable long id) {
102102

103103
return repository.findById(id) //
104-
.map(employee -> new EntityModel<>(employee, //
104+
.map(employee -> EntityModel.of(employee, //
105105
linkTo(methodOn(EmployeeController.class).findOne(employee.getId())).withSelfRel(), //
106106
linkTo(methodOn(EmployeeController.class).findAll()).withRel("employees"))) //
107107
.map(ResponseEntity::ok) //

springdoc-openapi-hateoas/src/test/java/test/org/springdoc/api/app2/hateoas/PostResourceAssembler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ public class PostResourceAssembler implements RepresentationModelAssembler<Post,
1818

1919
@Override
2020
public EntityModel<Post> toModel(Post entity) {
21-
return new EntityModel<>(entity);
21+
return EntityModel.of(entity);
2222
}
2323
}

springdoc-openapi-hateoas/src/test/java/test/org/springdoc/api/app4/AlbumModelAssembler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class AlbumModelAssembler implements RepresentationModelAssembler<Album,
1414
@Override
1515
public EntityModel<Album> toModel(Album entity) {
1616
List<Link> links = new ArrayList<>();
17-
return new EntityModel<>(entity, links);
17+
return EntityModel.of(entity, links);
1818
}
1919

2020
}

springdoc-openapi-javadoc/src/test/resources/results/app65.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
}
1818
],
1919
"paths": {
20-
"/ping": {
20+
"/health": {
2121
"get": {
2222
"tags": [
2323
"Health"
@@ -39,7 +39,7 @@
3939
}
4040
}
4141
},
42-
"/health": {
42+
"/ping": {
4343
"get": {
4444
"tags": [
4545
"Health"

springdoc-openapi-javadoc/src/test/resources/results/app66.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
],
4747
"summary": "Check server status",
4848
"description": "Check server status, will return 200 with simple string if alive. Do nothing else.",
49-
"operationId": "ping_1",
49+
"operationId": "ping",
5050
"responses": {
5151
"200": {
5252
"description": "the response entity",
@@ -68,7 +68,7 @@
6868
],
6969
"summary": "Check server status",
7070
"description": "Check server status, will return 200 with simple string if alive. Do nothing else.",
71-
"operationId": "ping",
71+
"operationId": "ping_1",
7272
"responses": {
7373
"200": {
7474
"description": "the response entity",

springdoc-openapi-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocConfigPathsTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
3131

3232
@TestPropertySource(properties = {
33+
"spring.mvc.pathmatch.matching-strategy=ant-path-matcher",
3334
"springdoc.swagger-ui.path=/test/swagger.html",
3435
"server.servlet.context-path=/context-path",
3536
"spring.mvc.servlet.path=/servlet-path"

springdoc-openapi-ui/src/test/java/test/org/springdoc/ui/app5/SpringDocOauthServletPathsTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
3131

3232
@TestPropertySource(properties = {
33+
"spring.mvc.pathmatch.matching-strategy=ant-path-matcher",
3334
"springdoc.swagger-ui.path=/test/swagger.html",
3435
"spring.mvc.servlet.path=/servlet-path"
3536
})

springdoc-openapi-webmvc-core/src/test/resources/results/app65.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
}
1818
],
1919
"paths": {
20-
"/ping": {
20+
"/health": {
2121
"get": {
2222
"tags": [
2323
"Health"
@@ -39,7 +39,7 @@
3939
}
4040
}
4141
},
42-
"/health": {
42+
"/ping": {
4343
"get": {
4444
"tags": [
4545
"Health"
@@ -85,4 +85,4 @@
8585
}
8686
},
8787
"components": {}
88-
}
88+
}

springdoc-openapi-webmvc-core/src/test/resources/results/app66.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
}
1818
],
1919
"paths": {
20-
"/ping": {
20+
"/": {
2121
"get": {
2222
"tags": [
2323
"Health"
2424
],
2525
"summary": "Check server status",
2626
"description": "Check server status, will return 200 with simple string if alive. Do nothing else.",
27-
"operationId": "ping",
27+
"operationId": "ping_2",
2828
"responses": {
2929
"200": {
3030
"description": "OK",
@@ -46,7 +46,7 @@
4646
],
4747
"summary": "Check server status",
4848
"description": "Check server status, will return 200 with simple string if alive. Do nothing else.",
49-
"operationId": "ping_1",
49+
"operationId": "ping",
5050
"responses": {
5151
"200": {
5252
"description": "OK",
@@ -61,14 +61,14 @@
6161
}
6262
}
6363
},
64-
"/": {
64+
"/ping": {
6565
"get": {
6666
"tags": [
6767
"Health"
6868
],
6969
"summary": "Check server status",
7070
"description": "Check server status, will return 200 with simple string if alive. Do nothing else.",
71-
"operationId": "ping_2",
71+
"operationId": "ping_1",
7272
"responses": {
7373
"200": {
7474
"description": "OK",
@@ -85,4 +85,4 @@
8585
}
8686
},
8787
"components": {}
88-
}
88+
}

0 commit comments

Comments
 (0)