2
我需要大量的XML數據存儲到CLOB和CLOB轉換回字符串使用的Clob與Spring NamedParameterJdbc模板
但問題是,我們正在使用(春季NamedParameterJdbc模板)
SqlParameterSource paramSource = new BeanPropertySqlParameterSource(
positionResponsesDO);
this.jdbcTemplate.update(sql, paramSource);
凡PositionResponsesDO有獲取和設置屬性
private Clob xmlData;
現在我需要字符串數據(大)轉換爲CLOB和Clob爲String。 請建議我最好的方法。
我不能用文件操作,因爲它是Web應用程序
如果我們正在使用RowMapper檢索結果,它將起作用。 但是如何將它與BeanPropertySqlParameterSource一起使用。因爲這個Spring實用程序將bean屬性映射到db列。所以,如果我用字符串標記bean屬性(db中的相應列是Clob),那會起作用嗎? – Reddy 2012-07-11 05:08:32
也許你應該先嚐試使用它... – 2012-07-11 12:30:56