Read e-book online Spring persistence : a running start PDF

By Paul Tepper Fisher; Solomon Duskis

ISBN-10: 1430218770

ISBN-13: 9781430218777

ISBN-10: 1430218789

ISBN-13: 9781430218784

Show description

Read or Download Spring persistence : a running start PDF

Similar java books

Read e-book online Java Software Solutions: Foundations of Program Design (8th PDF

Java software program ideas teaches a beginning of programming concepts to foster well-designed object-oriented software program. Heralded for its integration of small and big sensible examples, this world wide best-selling textual content emphasizes development reliable problem-solving and layout abilities to write down top quality courses.

Java 2 Primer Plus by Steven Haines, Stephen Potts PDF

Java Primer Plus courses the reader in the course of the Java programming language from the elemental ideas (basic syntax, variable, literals, operators, loops, conditional statements, and so on. ) via complex issues (RMI, JDBC, community socket programming, and so forth. ). It presents a deep clarification of Java programming strategies and applied sciences utilizing school room verified and confirmed strategies.

Extra resources for Spring persistence : a running start

Example text

In the end, we’ll always end up with a JDBC DataSource, and that’s all your code needs to care about. In our example, we’ll keep things simple. jdbc. jdbcDriver"/> Pretty simple, huh? Now, if we wanted to get a bit fancier, we could instead choose a popular database connection pool as our bean implementation. A connection pool is ideal for web applications in which multiple, concurrent database operations will be made.

No matter what persistence framework you choose, we recommend using a clean, layered approach for your persistence implementation. Spring encourages the use of DAOs; in fact, it has a variety of classes that make implementing the DAO pattern a snap. Let’s walk through the domain model, DAO, and service layers, step by step. Although controllers are a common layering pattern for user interaction, we won’t really cover controllers in this book; after all, they’re 22 Spring Persistence — A Running Start a fairly hefty subject on their own and they are two steps removed from the persistence layer, which is the subject of this book.

In the preceding example, we use the @Repository annotation, indicating that we are configuring a class with persistencerelated functionality. This will allow us to define a component scanner in our Spring configuration, through which Spring will search the appropriate package structure in order to find those classes that match the configured annotation type. jdbc package. It is also important to point out that we have added the @Autowired annotation above our setDataSource() setter, requesting that Spring inject a class of type DataSource into our JdbcPersonDao implementation.

Download PDF sample

Spring persistence : a running start by Paul Tepper Fisher; Solomon Duskis

by Brian

Rated 4.51 of 5 – based on 33 votes