spring-jdbc

Spring JDBC Template for calling Stored Procedures

五迷三道 提交于 2019-11-26 06:13:00
问题 What is the correct way to invoke stored procedures using modern day (circa 2012) Spring JDBC Template? Say, I have a stored procedure that declares both IN and OUT parameters, something like this: mypkg.doSomething( id OUT int, name IN String, date IN Date ) I have come across CallableStatementCreator based approaches where we have to explicitly register IN and OUT parameters. Consider the following method in JdbcTemplate class: public Map<String, Object> call(CallableStatementCreator csc,

Spring - @Transactional - What happens in background?

北慕城南 提交于 2019-11-25 23:36:03
问题 I want to know what actually happens when you annotate a method with @Transactional ? Of course, I know that Spring will wrap that method in a Transaction. But, I have the following doubts: I heard that Spring creates a proxy class ? Can someone explain this in more depth . What actually resides in that proxy class? What happens to the actual class? And how can I see Spring\'s created proxied class I also read in Spring docs that: Note: Since this mechanism is based on proxies, only \