Spring 4 en spring data
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Spring 4 en spring data

on

  • 355 views

What's new in Spring 4?

What's new in Spring 4?
Plus an introduction to Spring Data Modules

Statistics

Views

Total Views
355
Views on SlideShare
353
Embed Views
2

Actions

Likes
2
Downloads
10
Comments
0

1 Embed 2

https://www.linkedin.com 2

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

CC Attribution-ShareAlike LicenseCC Attribution-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Spring 4 en spring data Presentation Transcript

  • 1. Spring Framework 4 and Spring Data WHAT’S NEW
  • 2. Agenda Intro to Spring IoC ◦ Spring 3.x highlights What’s new in Spring Core 4 ◦ @Conditional ◦ Spring Boot ◦ Autowiring voor Generic types Spring Data ◦ SQL and NoSQL ◦ Generic Query Framework
  • 3. Intro to Spring Framework Inversion of Control Pattern ◦ GoF °1995: Strategy Pattern ◦ Program using interfaces ◦ Clients are not tied to implementations ◦ Dependency Injection ◦ Central Application Context to wire implementations together ◦ Hollywood Principle: Don’t call us, we’ll call you ◦ Allows better testing Spring Framework ◦ Rod Johnson book on J2EE: Spring 0.1 °2002 ◦ Application context using XML descriptors ◦ ‘Faster, Beter, Lighter Java’: O’Reilly °2004 ◦ Spring and Hibernate as alternative to J2EE/EJB 1/EJB 2
  • 4. Spring Framework Modules Spring includes various abstraction modules ◦ Database abstraction ◦ Exception Handling ◦ JDBC Abstraction ◦ Hibernate/JPA Session Management (deprecated) ◦ Remoting ◦ Data serialization abstraction ◦ Exception Handling ◦ Messaging ◦ JMS API Abstraction ◦ Data serialization abstraction ◦ Management ◦ JMX API Abstraction Spring Framework also has Spring MVC and Spring WebFlow
  • 5. Spring 3.x Highlights Spring 2.5 ◦ @Autowired and @Component classpath scanning ◦ Less XML Spring 3.0 ◦ JavaConfig iso XML Config files ◦ Even less XML Spring 3.1 ◦ Bean Profiles ◦ TestContext support Spring 3.2 ◦ Spring MVC improvements ◦ Spring MVC REST
  • 6. Spring Framework 4 No big changes ◦ Mostly everything is backwards compatible ◦ Except @Autowired with Generics ◦ Some deprecated methods are finally removed ◦ E.g: ibatis ORM support ◦ Spring MVC base classes before annotation support Some new features ◦ @Conditional ◦ Spring Boot ◦ Support for Groovy iso XML Some modules major upgrade ◦ Spring MVC with WebSocket support
  • 7. WebSockets in Spring 4 DEMO: https://github.com/rstoyanchev/spring-websocket-portfolio
  • 8. Spring Data Data Persistence abstraction ◦ Supports both SQL and NoSQL ◦ JPA/JDBC ◦ MongoDB/Hadoop ◦ Repository abstraction ◦ Save/load/delete ◦ Paging and sorting ◦ Entity annotations are stil implementation specific ◦ Query Language abstraction ◦ QueryDSL
  • 9. Spring Data Queries Declare methods in your repository interface ◦ findByXxxx ◦ Spring AOP will generate Implementation Or: use @Query annotation
  • 10. Spring Data DEMO
  • 11. Questions