Используйте Spring Stuff для вызова хранимой процедуры.
enter code here : public class MyStoredProcedure extends StoredProcedure {
public MyStoredProcedure(){
}
public MyStoredProcedure(DataSource ds) {
this.setDataSource(ds);
this.setSql("procedure name");
this.declareParameter(new SqlParameter("param", Types.VARCHAR));
this.compile();
}
public void callProcedure() {
Map<String, String> inParams = new HashMap<String, String>();
inParams.put("param", "Good");
try {
execute(inParams);
} catch (Exception e) {
System.out.println("Error Man : " + e);
}
}
public static void main(String[] args) {
DriverManagerDataSource dataSource new DriverManagerDataSource("Driver", "url", "uname", "upass");
try{
MyStoredProcedure procedure = new MyStoredProcedure(dataSource);
procedure.callProcedure();
}catch(Exception exception){
System.out.println("Eroooorrror : "+exception);
}
}
}