Javatpoint Logo

regarding JdbcTemplate in Springs

By: palemg*** On: Thu Feb 25 10:27:26 IST 2016     Question Reputation0 Answer Reputation0 Quiz Belt Series Points0  0Blank User
what my question is in jdbc we will write code to handle exception and to print that exception right
For example
Try{
----code
}
Catch(Exception e)
{
System.our.println(e); or e.printStackTrace();
}


But in spring we are not writing that code if exception will occur how it will print

In spring we will only execute query like this

1. public int saveEmployee(Employee e){
2. String query="insert into employee values(
3. '"+e.getId()+"','"+e.getName()+"','"+e.getSalary()+"')";
4. return jdbcTemplate.update(query);
5. }


can any one explain please?
Up0Down