万本电子书0元读

万本电子书0元读

顶部广告

Spring Roo 1.1 Cookbook电子书

售       价:¥

1人正在读 | 0人评论 9.8

作       者:Ashish Sarin

出  版  社:Packt Publishing

出版时间:2011-09-27

字       数:678.6万

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

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

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
This is a cookbook full of recipes with the essential code explained clearly and comprehensively. The recipes are organized so well that you will have no problems in using this cookbook as a reference too. Spring Roo 1.1 Cookbook is for developers new to the Spring Roo tool but with experience developing applications using Spring framework, AspectJ, JPA, GWT, and technologies/frameworks supported by Spring Roo. If you are new to the Spring framework, then it is recommended to refer to a text covering Spring, before reading this Cookbook.
目录展开

Spring Roo 1.1 Cookbook

Table of Contents

Spring Roo 1.1 Cookbook

Credits

About the Author

About the Reviewers

www.PacktPub.com

Support files, eBooks, discount offers and more

Why Subscribe?

Free Access for Packt account holders

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

Errata

Piracy

Questions

1. Getting Started with Spring Roo

Introduction

Setting up Roo

Getting ready

How to do it...

How it works...

There's more...

Using Spring Roo with Eclipse/STS

See also

Getting help and hints from Roo

Getting ready

How to do it...

How it works...

There's more...

Passing arguments to Roo commands

Log file for executed Roo commands

See also

Creating a Roo project

Getting ready

How to do it...

How it works...

There's more...

See also

Importing a Roo project into Eclipse or IntelliJ IDEA IDE

Getting ready

How to do it...

How it works...

There's more...

See also

Configuring logging

Getting ready

How to do it...

How it works...

There's more...

See also

Viewing properties defined in a properties file

Getting ready

How to do it...

How it works...

See also

Managing properties defined in a properties file

Getting ready

How to do it...

How it works...

There's more...

See also

Creating a Java class

Getting ready

How to do it...

How it works...

There's more...

Moving existing Spring projects to use Spring Roo

@RooToString—customizing the name of the toString method

@RooToString—excluding properties from the toString method

See also

Adding attributes to a Java class

Getting ready

How to do it...

How it works...

There's more...

@RooJavaBean—controlling the generation of getter and setter methods

See also

Creating a Java interface

Getting ready

How to do it...

How it works...

There's more...

See also

Referring to a type from the Roo shell

Getting ready

How to do it...

How it works...

There's more...

See also

Creating application artifacts from Roo script

Getting ready

How to do it...

How it works...

There's more...

See also

2. Persisting Objects Using JPA

Introduction

Setting up a JPA provider for your project

Getting ready

How to do it...

How it works...

There's more...

JNDI-bound data source

See also

Viewing database configuration properties

Getting ready

How to do it...

How it works...

There's more...

See also

Managing database configuration properties

Getting ready

How to do it...

How it works...

There's more...

See also

Creating persistent entities

Getting ready

How to do it...

How it works...

There's more...

Adding table column information in persistent entity fields

The class argument in roo commands

See also

Adding JSR 303 constraints to persistent fields

Getting ready

How to do it...

How it works...

There's more...

See also

Controlling auto-generated methods of persistent entities

Getting ready

How to do it...

How it works...

See also

Creating integration tests for persistent entities

Getting ready

How to do it...

How it works...

There's more...

Customizing seed data creation

Controlling integration test methods

Generating integration tests at the time of entity creation

Providing custom implementation for integration tests

See also

Creating new 'data on demand' for testing entities

Getting ready

How to do it...

How it works...

See also

Creating mock tests for persistent entities

Getting ready

How to do it...

How it works...

See also

Executing persistent entities tests

Getting ready

How to do it...

How it works...

There's more...

See also

Creating applications that interact with multiple databases

Getting ready

How to do it...

How it works...

See also

Packaging your Roo project

Getting ready

How to do it...

How it works...

There's more...

See also

3. Advanced JPA Support in Spring Roo

Introduction

Viewing candidate dynamic finder methods

Getting ready

How to do it...

How it works...

There's more...

Listing dynamic finder methods for multiple persistent fields

Limiting list of dynamic finder methods, based on a filter criteria

See also

Adding dynamic finder methods to an entity

Getting ready

How to do it...

How it works...

There's more...

Adding custom finder methods

Integration testing of dynamic finder methods

Adding dynamic finders through @RooEntity annotation

See also

Creating a many-to-one (or one-to-one) relationship between entities

Getting ready

How to do it...

How it works...

There's more...

Testing JPA entities that participate in relationships

Dynamic finder method for a many-to-one relationship field

See also

Creating a one-to-many (or many-to-many)relationship between entities

Getting ready

How to do it...

How it works...

There's more...

See also

Creating a mapped superclass

Getting ready

How to do it...

How it works...

There's more...

Creating @Embeddable annotated classes

See also

Customizing Roo-generated identifier definition

Getting ready

How to do it...

How it works...

There's more...

See also

Generating database metadata

Getting ready

How to do it...

How it works...

There's more...

See also

Creating entities from a database

Getting ready

How to do it...

How it works...

There's more...

Installing JDBC drivers for Oracle and DB2

Modifying auto-generated JPA fields/relationships

Incremental database reverse engineering

Database table with composite primary key

See also

4. Web Application Development with Spring Web MVC

Introduction

Auto-generating Spring MVC controllers andJSPX views from JPA entities

Getting ready

How to do it...

How it works...

Configuration information defined in web.xml

contextConfigLocation initialization parameter

ContextLoaderListener

DispatcherServlet

OpenEntityManagerInViewFilter

HiddenHttpMethodFilter

Exception pages

Beans and configurations defined in webmvc-config.xml

Controller auto-detection

Annotation-driven development support and conversion service

ResourceHttpRequestHandler

DefaultServletHttpRequestHandler

Theme and locale change interceptors

ParameterizableViewController

View resolution

Tiles definitions

Exception handling

Miscellaneous configuration

Roo-generated controllers

There's more...

See also

Packaging, deploying, and using aRoo-generated Spring MVC application

Getting ready

How to do it...

How it works...

There's more...

Running Roo project in embedded Jetty container

See also

Modifying Roo-generated views

Getting ready

How to do it...

How it works...

Changing the displayed application name and welcome text

Changing menu options

Significance of z attribute of Roo installed JSP tags

Understanding a Roo-generated JSPX file

Switching elements from user-managed to Roo-managed mode

See also

Round-tripping support in Spring Roofor web controllers and views

Getting ready

How to do it...

How it works...

There's more...

See also

Creating a Spring MVC controller for a specific JPA entity

Getting ready

How to do it...

How it works...

There's more...

Overriding auto-generated controller methods

See also

Manually creating a Spring MVC controller for a JPA entity

Getting ready

How to do it...

How it works...

There's more...

Scaffolding Spring Web MVC application for a one-to-many relationship

See also

Adding static views to a Roo-generated web application

Getting ready

How to do it...

How it works...

See also

Internationalizing Roo-generated web applications

Getting ready

How to do it...

How it works...

There's more...

See also

Adding or modifying themes generated by Roo

Getting ready

How to do it...

How it works...

There's more...

See also

Adding JSON support to domain objects and controllers

Getting ready

How to do it...

How it works...

See also

Creating and executing Selenium tests for web controllers

Getting ready

How to do it...

How it works...

Selenium test scripts

Selenium test suite

There's more...

See also

5. Web Application Development with GWT, Flex, and Spring Web Flow

Introduction

Scaffolding GWT applications from JPA entities

Getting ready

How to do it...

How it works...

GWT module descriptor

The GWT module's entry point

Dependency injection using GIN

EntityProxy, RequestContext, and RequestFactory interfaces

Activities and places

Dealing with entity proxy-specific processing

There's more...

Compiling and running the GWT application in an embedded Jetty container

Accessing the mobile version of the GWT application

Round-tripping support for GWT applications

Enabling remote logging

See also

Getting started with Flex application development

Getting ready

How to do it...

How it works...

There's more...

Flexmojos Maven plugin configuration

See also

Scaffolding a Flex application from JPA entities

Getting ready

How to do it...

How it works...

There's more...

See also

Getting started with Spring Web Flow

Getting ready

How to do it...

How it works...

Spring Web Flow configuration

Developing applications using both Spring Web MVC and Spring Web Flow

There's more...

See also

6. Emailing, Messaging, Spring Security, Solr, and GAE

Introduction

Sending e-mails using JavaMail API

Getting ready

How to do it...

How it works...

Setting up e-mail sending support

Setting up a mail message

Sending mails

There's more...

Sending e-mails asynchronously

Sending e-mails with attachments

Sending e-mails with JavaMail Session configured in JNDI

See also

Sending and receiving JMS messages

Getting ready

How to do it...

How it works...

Setting up a JMS provider

Sending message using JMS Template

Creating a JMS message consumer

There's more...

Sending JMS messages asynchronously

See also

Configuring Spring Security for your application

Getting ready

How to do it...

How it works...

Spring Security application context XML file

AuthenticationManager configuration

Web request security configuration

Using Spring Security with Apache Directory Server

Flight Booking application requirements

Getting ready

How to do it...

How it works...

Setting up embedded Apache Directory Server

Authenticating against the LDAP server

Configuring web request security

Configuring method-level security

Adding @Secured annotation to JPA entity methods

Deploying a GWT application on GAE

Getting ready

How to do it...

How it works...

appengine-web.xml

Maven GAE plugin

Maven DataNucleus plugin

Persistent entities

Authentication and authorization in GAE applications

Deploying a Spring Web MVC application on GAE

Getting ready

How to do it...

How it works...

Owned relationship

Managing persisted data using Admin Console

There's more...

See also

Adding search capability to your domain model with Sol

Getting ready

How to do it...

How it works...

Configuring Solr for Roo project

Adding domain model data to Solr index and searching Solr documents

Methods and attributes introduced by *_Roo_SolrSearch.aj AspectJ ITD

Searching Solr documents

There's more...

Customizing Roo-generated *_Roo_SolrSearch.aj AspectJ ITD

7. Developing Add-ons and Removing Roo from Projects

Introduction

Setting up GnuPG for add-on development

Getting ready

How to do it...

How it works...

See also

Installing an installable add-on

Getting ready

How to do it...

How it works...

There's more...

Trusting add-ons by default

Installing add-ons not indexed by RooBot

See also

Developing a simple add-on

Getting ready

How to do it...

How it works...

MysimpleCommands class

Defining Roo commands

Making Roo commands unavailable

The MysimpleOperations interface and MysimpleOperationsImpl class

MysimpleNameProperty enum type

There's more...

Deploying and running mysimple add-on

Using the mysimple add-on in a Roo project

Tab-completion feature with constant values

Multiple command availability using @CliAvailabilityIndicator

Templates in Roo add-ons

The pom.xml file

OSGi commands for troubleshooting

See also

Developing an advanced add-on

Getting ready

How to do it...

How it works...

The MyadvancedCommands class

The MyadvancedOperationsImpl class

The MyadvancedMetadataProvider class

Dependency registration and unregistration

Registering and unregistering metadata creation trigger

Code generation functionality of add-ons

There's more...

See also

Converting non-OSGi JDBC drivers into OSGi-compliant bundles

Getting ready

How to do it...

How it works...

See also

Removing Roo with push-in refactoring

Getting ready

How to do it...

How it works...

There's more...

Push-in refactoring—single AspectJ ITD file

Push-in refactoring – across the whole project

See also

Adding Roo to a project using pull-out refactoring

Getting ready

How to do it...

There's more...

See also

Upgrading to the latest version of Roo

Getting ready

How to do it...

How it works...

There's more...

Index

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

发表评论

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

买过这本书的人还买过

读了这本书的人还在读

回顶部