|
|
|
@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.lang.reflect.Field;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
|
|
|
|
|
|
|
@RestController
|
|
|
|
|
@RequestMapping("api/producto")
|
|
|
|
@ -21,6 +22,7 @@ import java.util.Map;
|
|
|
|
|
public class ProductoController {
|
|
|
|
|
@Autowired ProductoService productoService;
|
|
|
|
|
|
|
|
|
|
@PreAuthorize("hasAuthority('Product_Read')")
|
|
|
|
|
@GetMapping("/")
|
|
|
|
|
public List<Producto> findAll(){
|
|
|
|
|
return productoService.findAll();
|
|
|
|
|