JAVA-29231 Move modules inside existing container modules (#15492)
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
package com.baeldung.controller;
|
||||
|
||||
import com.baeldung.model.Response;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import static java.lang.String.format;
|
||||
|
||||
@RestController
|
||||
public class RetrieveUuidController {
|
||||
|
||||
@GetMapping("/api/uuid")
|
||||
public Response uuid() {
|
||||
return new Response(format("Test message... %s.", UUID.randomUUID()));
|
||||
}
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package com.baeldung.controller;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.baeldung.model.Response;
|
||||
|
||||
@RestController
|
||||
public class SecuredUuidController {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(SecuredUuidController.class);
|
||||
|
||||
@GetMapping("/secured/uuid")
|
||||
public Response uuid() {
|
||||
|
||||
LOGGER.info("Returning response");
|
||||
|
||||
return new Response(String.format("Secured test message... %s.", UUID.randomUUID()));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user