package {{basePackage}}.gsondemo;

import {{basePackage}}.gsondemo.data.Product;
import com.google.gson.Gson;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ProductController {

    @GetMapping("/product")
    public String getProduct() {
        Product product = new Product("123", "Demo Product", 123);
        Gson gson = new Gson();
        String json = gson.toJson(product);
        return json;
    }
}
