万本电子书0元读

万本电子书0元读

顶部广告

Spring Essentials电子书

售       价:¥

1人正在读 | 0人评论 9.8

作       者:Shameer Kunjumohamed

出  版  社:Packt Publishing

出版时间:2016-02-26

字       数:198.6万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Build mission-critical enterprise applications using Spring Framework and Aspect Oriented ProgrammingAbout This BookStep into more advanced features of aspect-oriented programming and API components to build enterprise grade systemsBuild lightning-fast web applications and REST APIs using Spring MVC and its asynchronous processing capabilities with the view technologies of your choiceExplore simplified but powerful data access techniques including JPA (Java Persistence Architecture) repositories and NoSQL data accessWho This Book Is ForIf you are a Java developer who is looking to master Enterprise Java Development using Spring Framework, then this book is ideal for you. Prior understanding of core Java programming and a high-level understanding of Spring Framework is recommended. Having sound knowledge of servlet-based web development in Java and basic Database concepts would be an advantage but not a requirement.What You Will LearnSet up and build standalone and web-based projects using Spring Framework with Maven or GradleGet familiar with JSP Form processing using Spring and Form Tag LibraryDevelop RESTful API applications for XML and JSON data transfers with non-blocking asynchronous capabilitiesExplore Spring’s comprehensive transaction support for declarative Transaction Management and its integration with Spring’s data access abstractionsInvestigate Spring Data access mechanisms with Spring Data Repositories, a simple and consistent data-access abstractionConstruct real-time applications using WebSocket with a SockJS fallback optionUnderstand how to secure your Spring Web and standalone applications using Spring Security declaratively and consistentlyGet to grips with the end-to-end development of an API-based modern SPA using EmberJS at the front end and SpringMVC at the back endIn DetailSpring is an open source Java application development framework to build and deploy systems and applications that run on the JVM. It is the industry standard and the most popular framework among Java developers with over two-thirds of developers using it.Spring Essentials makes learning Spring so much quicker and easier with the help of illustrations and practical examples. Starting from the core concepts of features such as inversion of Control Container and BeanFactory, we move on to a detailed look at aspect-oriented programming. We cover the breadth and depth of Spring MVC, the WebSocket technology, Spring Data, and Spring Security with various authentication and authorization mechanisms.Packed with real-world examples, you’ll get an insight into utilizing the power of Spring Expression Language in your applications for higher maintainability. You’ll also develop full-duplex real-time communication channels using WebSocket and integrate Spring with web technologies such as JSF, Struts 2, and Tapestry. At the tail end, you will build a modern SPA using EmberJS at the front end and a Spring MVC-based API at the back end.By the end of the book, you will be able to develop your own dull-fledged applications with Spring.Style and approachThis book is a practical guide based on logical modules of the whole Spring Framework family, with a start-small approach, increasing in complexity as it progresses. Every chapter is an amalgamation of theory and practical examples, with further discussion on additional features and approaches.
目录展开

Spring Essentials

Table of Contents

Spring Essentials

Credits

About the Authors

About the Reviewer

www.PacktPub.com

eBooks, discount offers, and more

Why subscribe?

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Downloading the color images of this book

Errata

Piracy

Questions

1. Getting Started with Spring Core

The Spring landscape

The Spring Framework modules

Spring Tool Suite (STS)

Spring subprojects

Design concepts behind Spring Framework

Setting up the development environment

Your first Spring application

Inversion of Control explained

Dependency Injection

The Spring IoC container

Configuration metadata

XML-based configuration metadata

Annotation-based configuration metadata

XML-based versus annotation-based configuration

Component stereotype annotations

Java-based configuration metadata

JSR 330 standard annotations

Beans in detail

Bean definition

Instantiating beans

With constructors

With a static factory-method

With an instance factory-method

Injecting bean dependencies

Constructor-based Dependency Injection

Setter-based Dependency Injection

Constructor-based or setter-based DI – which is better?

Cleaner bean definitions with namespace shortcuts

Wiring a List as a dependency

Wiring a Map as a dependency

Autowiring dependencies

Bean scoping

Dependency Injection with scoped beans

Creating a custom scope

Hooking to bean life cycles

Implementing InitializingBean and DisposableBean

Annotating @PostConstruct and @PreDestroy on @Components

The init-method and destroy-method attributes of <bean/>

Container-level default-init-method and default-destroy-method

Working with bean definition profiles

Injecting properties into the Spring environment

Externalizing properties with PropertyPlaceholderConfigurer

Handling resources

Spring Expression Language

SpEL features

SpEL annotation support

The SpEL API

Aspect Oriented Programming

Static and dynamic AOP

AOP concepts and terminology

Spring AOP – definition and configuration styles

XML schema-based AOP

@AspectJ annotation-based AOP

Declaring an @Aspect annotation

Pointcuts

Pointcut designators

Pointcut examples

Advices

The @Around Advice

Accessing Advice parameters

Testing with Spring

Mock objects

Unit and integration testing utilities

Summary

2. Building the Web Layer with Spring Web MVC

Features of Spring MVC

The Model-View-Controller pattern

Your first Spring MVC application

Setting up a Spring MVC application

The project structure of a Spring MVC application

The web.xml file – Springifying the web app

ApplicationContext files in a Spring MVC application

HomeController – @Controller for the home screen

The home.jsp file – the landing screen

Handling incoming requests

The architecture and components of Spring MVC

DispatcherServlet explained

WebApplicationContext – ApplicationContext for the Web

Beans supporting DispatcherServlet and their roles

Controllers in detail

Mapping request URLs with @RequestMapping

URI template patterns with the @PathVariable annotation

Binding parameters with the @RequestParam annotation

Request handler method arguments

Request handler method return types

Setting Model attributes

Building RESTful services for JSON and XML media

Building a RESTful service with RestController

Asynchronous request processing in Spring MVC

Working with views

Resolving views

Resolving JSP views

Binding Model attributes in JSP pages using JSTL

Spring and Spring form tag libraries

Composing a form in JSP

Validating forms

Handling file uploads

Resolving Thymeleaf views

More view technologies

Summary

3. Accessing Data with Spring

Configuring DataSource

Using embedded databases

Handling exceptions in the Spring Data layer

DAO support and @Repository annotation

Spring JDBC abstraction

JdbcTemplate

NamedParameterJdbcTemplate

SimpleJdbc classes

JDBC operations with Sql* classes

Spring Data

Spring Data Commons

Spring Data repository specification

Spring Data JPA

Enabling Spring Data JPA

JpaRepository

Spring Data MongoDB

Enabling Spring Data MongoDB

MongoRepository

Domain objects and entities

Query resolution methods

Using the @Query annotation

Spring Data web support extensions

Auditing with Spring Data

Spring Transaction support

Relevance of Spring Transaction

Spring Transaction fundamentals

Declarative transaction management

Transactional modes – proxy and AspectJ

Defining transactional behavior

Setting rollback rules

Using the @Transactional annotation

Enabling transaction management for @Transactional

Programmatic transaction management

Summary

4. Understanding WebSocket

Creating a simple WebSocket application

STOMP over WebSocket and the fallback option in Spring 4

Broadcasting a message to a single user in a WebSocket application

Summary

5. Securing Your Applications

Authentication

Authorization

The OAuth2 Authorization Framework

Summary

6. Building a Single-Page Spring Application

The motivations behind SPAs

SPAs explained

The architectural benefits of SPAs

SPA frameworks

Introducing Ember.js

The anatomy of an Ember application

Routers

Routes or route handlers

Templates

Components

Models

Controllers

Input helpers

Custom helpers

Initializers

Services

Working with Ember CLI

Setting up Ember CLI

Getting started with Ember CLI commands

The Ember project structure

Working with the POD structure

Understanding the Ember object model

Declaring types (classes) and instances

Accessing and mutating properties

Computed properties

Property observers

Working with collections

Building UI templates using Handlebars

Handlebars helpers

Data binding with input helpers

Using control flow helpers in Handlebars

Using event helpers

Handling routes

Handling UI behavior using components

Building a ToggleButton component step by step

Persisting data with Ember Data

Ember Data architecture

Defining models

Defining model relationships

Building a Taskify application

Building the API server app

Setting up and configuring the project

Defining the model definitions – User and Task

Building API endpoints for the Taskify app

UserController.java

TaskController.java

Building the Taskify Ember app

Setting up Taskify as an Ember CLI project

Setting up Ember Data

Configuring application routes

Building the home screen

Building the user screen

Building a custom helper

Adding action handlers

Building a custom component – modal window

Building userEditModal using {{modal-window}}

Building the task screen

Summary

7. Integrating with Other Web Frameworks

Spring's JSF integration

Spring's Struts integration

Summary

Index

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部