JAVA-31190: Preparation for migrating spring-boot-modules to version 3. (#15834)
This commit is contained in:
+2
-3
@@ -12,9 +12,8 @@ import com.baeldung.boot.jackson.model.Coffee;
|
||||
public class CoffeeController {
|
||||
|
||||
@GetMapping("/coffee")
|
||||
public Coffee getCoffee(
|
||||
@RequestParam(required = false) String brand,
|
||||
@RequestParam(required = false) String name) {
|
||||
public Coffee getCoffee(@RequestParam(name = "brand", required = false) String brand,
|
||||
@RequestParam(name = "name", required = false) String name) {
|
||||
return new Coffee().setBrand(brand)
|
||||
.setDate(FIXED_DATE)
|
||||
.setName(name);
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import jakarta.annotation.PostConstruct;
|
||||
|
||||
@Component
|
||||
@Scope(value = "prototype")
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import jakarta.annotation.PostConstruct;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Component
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.boot.test.web.client.TestRestTemplate;
|
||||
import org.springframework.boot.web.server.LocalServerPort;
|
||||
import org.springframework.boot.test.web.server.LocalServerPort;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.test.context.TestPropertySource;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.boot.test.web.client.TestRestTemplate;
|
||||
import org.springframework.boot.web.server.LocalServerPort;
|
||||
import org.springframework.boot.test.web.server.LocalServerPort;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user