0

I have a question in Spring JDBC settings. that more needed me ?

missing some other configuration

    <jee:jndi-lookup id=" wasDataSource "
                     jndi-name="jdbc/xxxx"
                     cache="true"
                     resource-ref="true"
                     lookup-on-startup="false"
                     proxy-interface="javax.sql.DataSource"/>

Dao:

public class BinnacleDaoImpl implements BinnacleDao {

    @Autowired
    JdbcTemplate jdbcTemplate;

    @Autowired
    public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
        this.jdbcTemplate = jdbcTemplate;
    }

    public String getFindBitacoraForDate(){
            //ArrayList value = new ArrayList();

            FOP fop =  jdbcTemplate.queryForObject(
                    "SELECT DESCRIPTION_HTML FROM PHUBUSR.FOP WHERE ID = ?;",
                    new Object[]{1},
                    new RowMapper<FOP>() {
                        public FOP mapRow(ResultSet rs, int rowNum) throws SQLException {
                            FOP fop = new FOP();
                            fop.setDescripcionHtml(rs.getString("DESCRIPTION_HTML"));
                            return fop;
                        }
                    });
            System.out.println(fop.getDescripcionHtml());

            return null;
        }

I'd appreciate your help

gonzo
  • 2,103
  • 1
  • 15
  • 27

0 Answers0