// Path: friendly-id-samples/friendly-id-spring-boot-hateos/src/main/java/com/devskiller/friendly_id/sample/hateos/domain/Foo.java
// @Data
// @AllArgsConstructor
// public class Foo {
// 
// 	private UUID id;
// 	private String name;
// 
// }


import com.devskiller.friendly_id.sample.hateos.domain.Foo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.hateoas.server.ExposesResourceFor;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.mvc.method.annotation.MvcUriComponentsBuilder;
import java.lang.invoke.MethodHandles;
import java.net.URI;
import java.util.UUID;
import static org.springframework.web.servlet.mvc.method.annotation.MvcUriComponentsBuilder.on;
package com.devskiller.friendly_id.sample.hateos;




@RestController
@ExposesResourceFor(FooResource.class)
@RequestMapping("/foos")
public class FooController {

	private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());

	private final FooResourceAssembler assembler;

	public FooController(FooResourceAssembler assembler) {
		this.assembler = assembler;
	}

	@GetMapping("/{id}")
	public HttpEntity<FooResource> get(@PathVariable UUID id) {
		log.info("Get {}", id);
// Path: friendly-id-samples/friendly-id-spring-boot-hateos/src/main/java/com/devskiller/friendly_id/sample/hateos/domain/Foo.java
// @Data
// @AllArgsConstructor
// public class Foo {
// 
// 	private UUID id;
// 	private String name;
// 
// }


// Path: friendly-id-samples/friendly-id-spring-boot-hateos/src/main/java/com/devskiller/friendly_id/sample/hateos/FooController.java
import com.devskiller.friendly_id.sample.hateos.domain.Foo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.hateoas.server.ExposesResourceFor;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.mvc.method.annotation.MvcUriComponentsBuilder;
import java.lang.invoke.MethodHandles;
import java.net.URI;
import java.util.UUID;
import static org.springframework.web.servlet.mvc.method.annotation.MvcUriComponentsBuilder.on;

package com.devskiller.friendly_id.sample.hateos;




@RestController
@ExposesResourceFor(FooResource.class)
@RequestMapping("/foos")
public class FooController {

	private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());

	private final FooResourceAssembler assembler;

	public FooController(FooResourceAssembler assembler) {
		this.assembler = assembler;
	}

	@GetMapping("/{id}")
	public HttpEntity<FooResource> get(@PathVariable UUID id) {
		log.info("Get {}", id);
		Foo foo = new Foo(id, "Foo");