spring convert from deprecated -


using simplejdbccall.returningresultset(parameterizedbeanpropertyrowmapper) deprecated spring 3.0.5. how change code use non-deprecated version of method?

private jdbctemplate jdbctemplate;  private simplejdbccall procgetreportextras;  public void setdatasource(datasource datasource) {     this.jdbctemplate = new jdbctemplate(datasource);      jdbctemplate.setresultsmapcaseinsensitive(true);      this.procgetreportextras =             new simplejdbccall(jdbctemplate)                 .withcatalogname("package")                 .withprocedurename("proc")                  .returningresultset("curreportlist",                             parameterizedbeanpropertyrowmapper.newinstance(report.class)); } 

you should able use beanpropertyrowmapper instead of parameterizedbeanpropertyrowmapper

new simplejdbccall(jdbctemplate)             .withcatalogname("package")             .withprocedurename("proc")              .returningresultset("curreportlist",                         beanpropertyrowmapper.newinstance(report.class)); 

the call

 beanpropertyrowmapper.newinstance(report.class)); 

returns beanpropertyrowmapper instance implements rowmapper. non deprecated version of returningresultset used.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

IIS->Tomcat Redirect: multiple worker with default -