package com.auth.example.controller; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController @CrossOrigin() public class ProductController { @RequestMapping({ "/product" }) public String hello() { return "Product saved successfully"; } }