Spring cookbook : over 100 hands-on recipes to build Spring web applications easily and efficiently /
This book is for you if you have some experience with Java and web development (not necessarily in Java) and want to become proficient quickly with Spring.
Clasificación: | Libro Electrónico |
---|---|
Autor principal: | |
Formato: | Electrónico eBook |
Idioma: | Inglés |
Publicado: |
Birmingham, UK :
Packt Publishing,
2015.
|
Colección: | Quick answers to common problems.
|
Temas: | |
Acceso en línea: | Texto completo |
Tabla de Contenidos:
- Cover
- Copyright
- Credits
- About the Author
- About the Reviewers
- www.PacktPub.com
- Table of Contents
- Preface
- Chapter 1: Creating a Spring Application
- Introduction
- Installing Java, Maven, Tomcat, and Eclipse on Mac OS
- Installing Java, Maven, Tomcat, and Eclipse on Ubuntu
- Installing Java, Maven, Tomcat, and Eclipse on Windows
- Creating a Spring web application
- Running a Spring web application
- Using Spring in a standard Java application
- Chapter 2: Defining Beans and Using Dependency Injection
- Introduction
- Defining a bean explicitly with @BeanDefining a bean implicitly with @Component
- Using a bean via dependency injection with @Autowired
- Using a bean directly
- Listing all beans
- Using multiple configuration classes
- Chapter 3: Using Controllers and Views
- Introduction
- Associating a route to a controller method
- Using a JSP view
- Passing attributes from a controller to a JSP view
- Using dynamic route parameters in a controller method
- Using a common prefix for the routes of a controller
- Using a page template with Tiles
- Executing some code before and after controllers using interceptorsBuilding multilingual pages
- Chapter 4: Querying a Database
- Introduction
- Connecting to a database
- Creating a DAO class
- Calling a DAO method from a controller class
- Saving an object
- Retrieving an object
- Retrieving a list of objects
- Retrieving a list of objects with their dependencies
- Updating an object
- Deleting an object
- Finding the number of results for an SQL query
- Saving a list of objects at once
- Reverting incomplete database modifications using transactionsUsing Hibernate for powerful object persistence and querying
- Chapter 5: Using Forms
- Introduction
- Displaying and processing a form
- Getting a submitted form value using a controller method argument
- Setting a form's default values using a model object
- Saving form data in an object automatically
- Using text, textarea, password, and hidden fields
- Using a select field
- Using a checkbox
- Using a list of checkboxes
- Using a list of radio buttons
- Validating a form using annotationsUploading a file
- Chapter 6: Managing Security
- Introduction
- Enabling Spring Security
- Authenticating users using the default login page
- Authenticating users using a custom login page
- Authenticating users using a database
- Adding a logout link
- Using public folders
- Authorizing only users with a specific role to view some pages
- Displaying page elements only to authenticated users in views
- Using HTTPS with Tomcat
- Chapter 7: Unit Testing
- Introduction
- Unit testing with JUnit 4