I am using Jdbctemplate to retrieve a single String value from the db. Here is my method.
public String test() {
String cert=null;
Strin
IMHO returning a null is a bad solution because now you have the problem of sending and interpreting it at the (likely) front end client.
I had the same error and I solved it by simply returning a List.
I used JDBCTemplate.query().
At the front end (Angular web client), I simply examine the list and if it is empty (of zero length), treat it as no records found.