Skip to content

Commit a5375cb

Browse files
author
eugenp
committed
minor upgrades
1 parent 6da1ecf commit a5375cb

File tree

5 files changed

+18
-10
lines changed

5 files changed

+18
-10
lines changed

spring-all/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<parent>
1111
<groupId>org.springframework.boot</groupId>
1212
<artifactId>spring-boot-starter-parent</artifactId>
13-
<version>1.2.5.RELEASE</version>
13+
<version>1.2.6.RELEASE</version>
1414
</parent>
1515

1616
<dependencies>

spring-boot/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>1.2.5.RELEASE</version>
14+
<version>1.2.6.RELEASE</version>
1515
</parent>
1616

1717
<dependencies>

spring-security-login-and-registration/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<parent>
1313
<groupId>org.springframework.boot</groupId>
1414
<artifactId>spring-boot-starter-parent</artifactId>
15-
<version>1.2.5.RELEASE</version>
15+
<version>1.2.6.RELEASE</version>
1616
</parent>
1717

1818
<dependencies>

spring-security-rest-full/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<parent>
1111
<groupId>org.springframework.boot</groupId>
1212
<artifactId>spring-boot-starter-parent</artifactId>
13-
<version>1.2.5.RELEASE</version>
13+
<version>1.2.6.RELEASE</version>
1414
</parent>
1515

1616
<dependencies>

spring-security-rest-full/src/main/java/org/baeldung/web/controller/FooController.java

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
package org.baeldung.web.controller;
22

3-
import com.google.common.base.Preconditions;
3+
import java.util.List;
4+
5+
import javax.servlet.http.HttpServletResponse;
6+
47
import org.baeldung.persistence.model.Foo;
58
import org.baeldung.persistence.service.IFooService;
69
import org.baeldung.web.exception.MyResourceNotFoundException;
@@ -14,11 +17,16 @@
1417
import org.springframework.http.HttpStatus;
1518
import org.springframework.http.MediaType;
1619
import org.springframework.stereotype.Controller;
17-
import org.springframework.web.bind.annotation.*;
20+
import org.springframework.web.bind.annotation.PathVariable;
21+
import org.springframework.web.bind.annotation.RequestBody;
22+
import org.springframework.web.bind.annotation.RequestMapping;
23+
import org.springframework.web.bind.annotation.RequestMethod;
24+
import org.springframework.web.bind.annotation.RequestParam;
25+
import org.springframework.web.bind.annotation.ResponseBody;
26+
import org.springframework.web.bind.annotation.ResponseStatus;
1827
import org.springframework.web.util.UriComponentsBuilder;
1928

20-
import javax.servlet.http.HttpServletResponse;
21-
import java.util.List;
29+
import com.google.common.base.Preconditions;
2230

2331
@Controller
2432
@RequestMapping(value = "/foos")
@@ -81,7 +89,7 @@ public List<Foo> findPaginated(@RequestParam("page") final int page, @RequestPar
8189
@ResponseBody
8290
public Foo create(@RequestBody final Foo resource, final HttpServletResponse response) {
8391
Preconditions.checkNotNull(resource);
84-
Foo foo = service.create(resource);
92+
final Foo foo = service.create(resource);
8593
final Long idOfCreatedResource = foo.getId();
8694

8795
eventPublisher.publishEvent(new ResourceCreatedEvent(this, response, idOfCreatedResource));
@@ -105,7 +113,7 @@ public void delete(@PathVariable("id") final Long id) {
105113

106114
@RequestMapping(method = RequestMethod.HEAD)
107115
@ResponseStatus(HttpStatus.OK)
108-
public void head(HttpServletResponse resp) {
116+
public void head(final HttpServletResponse resp) {
109117
resp.setContentType(MediaType.APPLICATION_JSON_VALUE);
110118
resp.setHeader("bar", "baz");
111119
}

0 commit comments

Comments
 (0)