Files
spring-soap/spring-boot-modules/spring-boot-3-native/src/main/java/com/baeldung/sample/UserController.java
Ralf Ueberfuhr 4ea66b59ce BAEL-5951: Spring Boot 3 Sample for Native Image builds incl. Runtime Hints (#13047)
* Update Spring Boot, Spring Native and Native Maven Plugin versions

* BAEL-5951: Spring Boot 3 Sample for Native Image builds incl. Runtime Hints

* BAEL-5951: Configure POMs and add Swagger UI runtime hints

* BAEL-5951: Remove Swagger UI runtime hints

* BAEL-5951: Remove Spring Boot3 parent POM from profiles because of JDK17 dependency during build (building the parent POM is even not necessary)

* BAEL-5951: Add tests

* BAEL-5951: Fix tests (PMD naming conventions)
2022-11-24 09:47:54 +01:00

20 lines
577 B
Java

package com.baeldung.sample;
import org.springframework.graphql.data.method.annotation.QueryMapping;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/api/v1/user")
public class UserController {
@QueryMapping("getUser")
@GetMapping(produces = MediaType.APPLICATION_JSON_VALUE)
public User getUser() {
return new User("John", "Doe");
}
}