Я хотел бы сделать запрос PATCH с помощью Springboot, без DTO (потому что каждый раз это займет слишком много времени).
Class: CheckConfigDeploiementLecture
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
private String namespacename;
private String servicename;
private String typeverification;
private String status;
private String details;
private String reportdate;
Репозиторий : CheckConfigDeploiementRepositoryLecture
@Repository
public interface CheckConfigDeploiementRepositoryLecture extends CrudRepository<CheckConfigDeploiementLecture, Integer> {
@Query(value="SELECT checkconfigdeploiement.id, categorienamespaces.namespacename, servicesnamespaces.servicename, typeverification, status, details, reportdate FROM categorienamespaces, servicesnamespaces, checkconfigdeploiement WHERE categorienamespaces.id = checkconfigdeploiement.idnamespace and servicesnamespaces.id = checkconfigdeploiement.idservicenamespace", nativeQuery = true)
ArrayList<CheckConfigDeploiementLecture> findAll();
}
Сторона контроллера:
@ApiOperation(value = "Mise à jour du status du check config",response = CheckConfigDeploiementLecture.class)
@RequestMapping(value = {"api/v1/updateconfigdeployment/{id}"}, method = RequestMethod.PATCH, consumes = MediaType.APPLICATION_JSON_VALUE)
public String GelAllCheckConfigDeployment(@PathVariable ("id") Integer id, @RequestBody Map<String, Object> updates) {
checkConfigDeploiementRepositoryLecture.save(updates, id);
return null;
}
Фактическая ошибка при сохранении (...).
Метод save (S) в типе CrudRepository неприменимо для аргументов (Карта , Integer)
Я много проверял, но не приехал, чтобы решить эту проблему .. Спасибо за помощь