Mind map
Spring
Map content
Spring
spring-jdbc
- jdbcTemplate
- This class exposes quite a few methods that make it easy for us to perform basic database operations. So I am talking about things like create, things like retrieving records, or updating records, and even deleting records. We can use the methods provided by the JdbcTemplate class to easily perform those kinds of operations. When we start talking about querying our databases, the JdbcTemplate class provides us the query() and queryForObject() methods. And as their names suggest, they allow us to read and retrieve results sets from the database. So we can use these methods to do things like select single records, or multiple records, or even counts. Anything that has to do with querying the database, these two methods, query() and queryForObject() are going to come into play.
- When we start talking about updating the database, JdbcTemplate provides the update() method that we can use for that and when I talk about updating the database, we can use this method to perform inserts, we can use it to perform updates, or we can use it to perform deletes. So those types of operations, they are all updating the database in some way. So when we need to perform those kinds of operations, SQL operations, we can use the JdbcTemplate's update() method to make that an easy process. And the last method I will talk about that comes from the JdbcTemplate class that we can use to support basic database operations is the execute() method. And we can use this method to basically execute any arbitrary SQL that we need to execute. So if you need to do something like create a table for example, the execute() method of the JdbcTemplate class is going to be able to step in and make that an easy process for you.
- query()
- queryforObject()
- update()
- execute()
- NamedParameterJdbcTemplate
- this class basically wraps a JdbcTemplate class and allows us to work with named parameters when we set up our SQL statements. Well when I use the NamedParameterJdbcTemplate class, you can see how that statement looks, so it's a bit more readable. I'm able to say Select * from foodgroups where id = and here is my named parameter. So I'm using the : to indicate that it is a NamedParameter. And the name of the parameter is id and this actual parameter is going to be provided by some other object that I have configured that contains my parameters.
- SimpleJdbcInsert
- it can be used for inserting data with very minimal configuration.
- jdbcTemplate
Spring MVC
- Dependencias
Spring WS
- mvn archetype:create -DarchetypeGroupId=org.springframework.ws \ -DarchetypeArtifactId=spring-ws-archetype \ -DarchetypeVersion= \ -DgroupId=com.mycompany.hr \ -DartifactId=holidayService
Information
- Description
- Mind Map on Spring, created by Gerardo Martinez on 19/06/2017.
- Created by
- Gerardo Martinez
- Views
- 4
- Rating