I need to fetch multilingual data from Oracle DB. As I have checked from sql developer the data when stored in Oracle tables are in correct format but when I try to fetch it using my Spring Boot application uisng queries it gets encrypted. Any suggestions how can I fetch same data in same format in my Java application?
For example String ' is converted to & apos ; (adding space)
@Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.READ_COMMITTED)
public List<CustomerTrigger> fetchTriggerDetails(String queryForTrigger)
throws COException {
List<CustomerTrigger> triggersList = null;
try {
triggersList = coJdbcTemplate.query(queryForTrigger,
new BeanPropertyRowMapper<CustomerTrigger>(
CustomerTrigger.class));
// if triggerListis not empty then only update
if (null != triggersList && !triggersList.isEmpty()) {
List<String> queryTriggerList = new ArrayList<>();
for (CustomerTrigger CustomerTrigger : triggersList) {
List<String> list= Arrays.asList(CustomerTrigger.getEventId().
split(StringConstants.COMMA_SEPERATOR));
queryTriggerList.addAll(list);
}
}
} catch (DataAccessException e) {
logger.error("Error while updating records" + e.getMessage());
e.printStackTrace();
MyException myException = new MyException(
ErrorConstants.TM_SQL_EXCEPTION_ERROR_CODE,
ErrorConstants.TM_SQL_EXCEPTION_ERROR_CODE
+ StringConstants.COLON + e.getMessage());
throw myException;
}
return triggersList;
}