You could get value from org.springframework.beans.TypeMismatchException just use Object getValue(), for example, using following code:
...
} catch(Exception exception) {
if(exception instanceof TypeMismatchException) {
Object value = ((TypeMismatchException) exp).getValue;
... // what you want to do with value
}
}
or just
...
} catch(TypeMismatchException exception) {
Object value = exp.getValue;
... // what you want to do with value
}
Because org.springframework.beans.TypeMismatchException define as
package org.springframework.beans;
public class TypeMismatchException extends PropertyAccessException {
...
/**
* Return the offending value (may be {@code null})
*/
@Override
public Object getValue() {
return this.value;
}
...
}