Skip to main content
edited body
Source Link
Bunyamin Coskuner
  • 8.9k
  • 2
  • 31
  • 50

Why do you not want to return anything? You should return at least true to notify the caller that the transaction was successful.

@PostMapping("/endpoint") public boolean updateSomeData(String value) { boolean result = someService.updateSomething(inputvalue); return result; } 

If you still do not want to return anything, you can simply change return type of the method to void as follows

@PostMapping("/endpoint") public void updateSomeData(String value) { someService.updateSomething(inputvalue); } 

Why do you not want to return anything? You should return at least true to notify the caller that the transaction was successful.

@PostMapping("/endpoint") public boolean updateSomeData(String value) { boolean result = someService.updateSomething(input); return result; } 

If you still do not want to return anything, you can simply change return type of the method to void as follows

@PostMapping("/endpoint") public void updateSomeData(String value) { someService.updateSomething(input); } 

Why do you not want to return anything? You should return at least true to notify the caller that the transaction was successful.

@PostMapping("/endpoint") public boolean updateSomeData(String value) { boolean result = someService.updateSomething(value); return result; } 

If you still do not want to return anything, you can simply change return type of the method to void as follows

@PostMapping("/endpoint") public void updateSomeData(String value) { someService.updateSomething(value); } 
edited body
Source Link
Bunyamin Coskuner
  • 8.9k
  • 2
  • 31
  • 50

Why do you not want to return anything? You should return at least true to notify the caller that the transaction was successful.

@PostMapping("/endpoint") public boolean updateSomeData(ObjectString inputvalue) { boolean result = someService.updateSomething(input); return result; } 

If you still do not want to return anything, you can simply change return type of the method to void as follows

@PostMapping("/endpoint") public void updateSomeData(ObjectString inputvalue) { someService.updateSomething(input); } 

Why do you not want to return anything? You should return at least true to notify the caller that the transaction was successful.

@PostMapping("/endpoint") public boolean updateSomeData(Object input) { boolean result = someService.updateSomething(input); return result; } 

If you still do not want to return anything, you can simply change return type of the method to void as follows

@PostMapping("/endpoint") public void updateSomeData(Object input) { someService.updateSomething(input); } 

Why do you not want to return anything? You should return at least true to notify the caller that the transaction was successful.

@PostMapping("/endpoint") public boolean updateSomeData(String value) { boolean result = someService.updateSomething(input); return result; } 

If you still do not want to return anything, you can simply change return type of the method to void as follows

@PostMapping("/endpoint") public void updateSomeData(String value) { someService.updateSomething(input); } 
Source Link
Bunyamin Coskuner
  • 8.9k
  • 2
  • 31
  • 50

Why do you not want to return anything? You should return at least true to notify the caller that the transaction was successful.

@PostMapping("/endpoint") public boolean updateSomeData(Object input) { boolean result = someService.updateSomething(input); return result; } 

If you still do not want to return anything, you can simply change return type of the method to void as follows

@PostMapping("/endpoint") public void updateSomeData(Object input) { someService.updateSomething(input); }