MyEclipse for Spring Reference – Wizards
1. Scaffold Spring CRUD Application Wizard
Scaffolding can generate full or major portions of an application by applying standard application patterns from a minimal set of existing artifacts provided by the developer. This wizard is used for all CRUD application scaffolding functions.
Note: Spring scaffolding requires a MyEclipse Spring or Bling subscription.
Inputs
- Relational Database Tables
- POJOs
- JPA Entities
- Domain Objects
- Web Layer – if selected, one or more web clients
- Service Layer
- Domain Layer
- Data Access
Scaffolding from Java Beans
Scaffold Spring CRUD Application >> Select Artifact Type(s) >> Select Artifacts >> Select Primary Keys >> Application Layers and Packages >> Select Web Client >> Customize User Interface >> Persistence Connection >> Target Folders >> Summary
Scaffolding from JPA Entities and Spring DSL Domain Objects
Scaffold Spring CRUD Application >> Select Artifact Type(s) >> Select Artifacts >> Application Layers and Packages >> Select Web Client >> Customize User Interface >> Persistence Connection >> Target Folders >> Summary
Scaffolding from Database Tables
Scaffold Spring CRUD Application >> Select Artifact Type(s) >> Select DB Connection >> Select Tables >> DB Scaffolding Options >> Application Layers and Packages >> Select Web Client >> Customize User Interface >> Target Folders >> Summary
Notes:
- If you are using the Spring DSL, the scaffolding wizard also adds the corresponding Spring DSL artifacts (model packages, controllers, services, etc…) for all scaffolded application components to your project. They appear in the Spring DSL view of your project, and you can maintain and enhance the scaffolded artifacts using the Spring DSL and Spring DSL Editors.
- Additional pages could be included in the wizard allowing you to set Spring-specific options and capabilities settings.
2.1 Select Artifact Type(s)
The Select Artifact Types page is used for specifying which type of artifacts (i.e., database tables, JPA entities, Java Beans) should be used as inputs to scaffolding. You can select from multiple artifact types.
Note: This page is shown only when the scaffolding wizard is invoked from the toolbar or the project. When scaffolding is invoked by right-clicking a Java artifact, this page is skipped.
Type | Description | ||
---|---|---|---|
Database Schema | For scaffolding from existing database tables (reverse-engineering of schema). You are prompted for a database connection to select the database tables that should be used for scaffolding. Scaffolding from a database schema must be done independently from the other artifact types. When you select the Database Schema option, the other artifact types are disabled. You need to re-run this wizard to scaffold from JPA Entities, Java Beans or Spring DSL Domain Objects. | ||
JPA Entities | For scaffolding from existing JPA Entities in the current project. The wizard scans for classes that have the @Entity annotation. | ||
Java Beans | For scaffolding from existing Java beans in the current project. The wizard scans for non-annotated Java classes that follow the Java bean convention (getters/setters for class attributes and zero arg constructor). | ||
Spring DSL Domain Objects | For scaffolding from existing Spring DSL Domain Objects. This option is shown only when the current project has the Spring DSL enabled (using the Enable Spring DSL wizard). The wizard scans for all Spring DSL Domain Objects. |
Note: Using the database schema option must be done separately from the JPA Entity, Java Bean, and Spring DSL Domain Object options. If you want to scaffold from a database schema and other artifact types, you can run the wizard once using the database schema artifact type and then rerun the wizard with other artifact types.
2.2 Select Artifacts for Scaffolding
The Select Artifacts for Scaffolding page scans the project for specified artifact types and lets you select the specific artifacts to be used for scaffolding.
Details | Description | ||
---|---|---|---|
Matching Artifacts | List of artifacts available from which to scaffold. This list is derived by the wizard by scanning the selected project or folder for artifacts that match the specified artifact type(s). | ||
Select Artifacts | List of selected artifacts for scaffolding. The artifacts are selected by adding them from the Matching Artifacts list. |
2.3 Select Primary Keys (for Java bean scaffolding only)
The Select Primary Key(s) page is for specifying the fields for any selected Java bean(s) that uniquely identify an instance of the Java bean.
Note: Since database tables, JPA entities, and Spring DSL domain objects already have declared primary keys, this page is applicable only for Java Bean scaffolding.
Details | Description | ||
---|---|---|---|
Scaffolding Inputs | Lists all Java beans selected for scaffolding and require the specification of primary keys. | ||
Primary Keys | As each Java bean is selected, the fields of the Java bean are listed. One or more fields must be specified as the primary key for each bean in the Java beans table. |
2.4 Application Layers and Packages
The Application Layers and Packages page is used for selecting which application layers are scaffolded and what package name should be used for generated Java/Spring code.
The selections on this page depend on what you’re trying to generate. By default all layers are enabled, and this results in the generation of a fully implemented application for the web clients you select on the next page (i.e., Spring MVC, Spring Web Flow, JavaServer Pages (JSP 2.0), Adobe Flex, Google Web Toolkit (GWT), and iPhone). However, in some cases you might want to only scaffold a few layers of the application. For example, you might already have implemented the JPA and DAO layer by hand or with other tooling, and you only want to scaffold the web layer and service layer. Perhaps you are planning to implement your back-end with Spring, but you want to implement the web layer with a different technology currently supported by scaffolding. In that case, you would probably only want to scaffold the service, domain, and data access layers.
Note: The selections on this page apply to all artifacts selected on previous wizard pages. If you want a different scaffolding configuration for different artifacts (or set of artifacts), then split the artifacts into groups that require similar scaffolding, and run this wizard once for each group.
Details | Description | ||
---|---|---|---|
Base Package | The base package name for all scaffolded application layers. The package name for all others layers is derived from the base package. For each layer, a sub-package (web, service, DAO, and domain) is appended to the base package. | ||
Scaffold web layer artifacts | Selected by default. Specifies whether the web layer is scaffolded, including Spring controllers (@Controller), Spring components (@Component), JUnit tests, JSP pages, Sitemesh configurations, localization files, and web layer Spring context files. | ||
Package (web) | The package name for all generated Java source code for the web layer. If base package is specified, by default the package name is derived by appending .web to the base package. It can be overridden. | ||
Scaffold service layer artifacts | Selected by default. Specifies whether the service layer is scaffolded, including including Spring services (@Service), service interfaces, JUnit tests, and service layer Spring context files. | ||
Package (service) | The package name for all generated Java source code for the service layer. If base package is specified, by default the package name is derived by appending .service to the base package. It can be overridden. | ||
Scaffold DAO layer artifacts | Selected by default. Specifies whether the data access object (DAO) layer is scaffolded, including Spring data access objects (@Repository), JPA named queries (@NamedQueries), JUnit tests, and DAO layer Spring context files. | ||
Package (DAO) | The package name for all generated Java source code for the DAO layer. If base package is specified, by default the package name is derived by appending .dao to the base package. It can be overridden. | ||
Package (domain layer) | The package name for all generated Java source code for the domain layer. If base package is specified, by default the package name is derived by appending .domain to the base package. It can be overridden. |
Notes:
- By default the web, service, DAO, and domain package names are derived from the input artifact package name, and the package name can be overridden. If you are scaffolding multiple artifacts and you want code generated to packages relative to input artifact, then you can use the ${domainPackage} and ${domainPackageParent} tokens to refer the input artifact’s package or parent package, respectively.
- When scaffolding from a database schema, there isn’t a Java class from which to derive a package name. So the package names are empty, and you must provide the package name.
- The package selector is only for specifying the package name. Specify where you want the code generated on the Select Target Folders page
2.5 Select Web Clients
The Select Web Clients page is used for the specifying the desired web layer implementations for the current scaffolding.
Details | Description | ||
---|---|---|---|
Spring MVC | Generates a front-end using Spring MVC. See Spring MVC scaffolding blueprint for details on what gets generated. | ||
Spring Web Flow | Generates a front-end using Spring Web Flow. See Spring Web Flow scaffolding blueprint for details on what gets generated. | ||
Adobe Flex | Generates a front-end using Adobe Flex. See Adobe Flex scaffolding blueprint for details on what gets generated. | ||
GWT | Generates a front-end using GWT. See GWT scaffolding blueprint for details on what gets generated. | ||
iPhone | Generates a front-end using iPhone. See iPhone scaffolding blueprint for details on what gets generated. | ||
JavaServer Faces | Generates a front-end using JavaServer Faces. See JavaServer Faces scaffolding blueprint for details on what gets generated. |
2.6 Flex Options
The Flex Options page is used for specifying configuration information for Flex scaffolding. Currently the only option is to specify the home folder of the Flex SDK. By default this panel specifies the Flex SDK instance that is included with MyEclipse for Spring, but you can specify a different instance of the SDK by selecting it from the file system.
Details | Description | ||
---|---|---|---|
Flex SDK Home | Specify the folder where Flex SDK is installed. Flex SDK can be downloaded from Adobe. | ||
Flex Version | Specify the version of Adobe Flex for which to generate. |
2.7 GWT Options
The GWT Options page is for specifying configuration information for GWT scaffolding, specifically which version of GWT application should be generated.
Details | Description | ||
---|---|---|---|
GWT Version | Used to specify whether to generate for GWT 2.0 or GWT 2.1 |
2.8 REST Options
The REST Options page is for specifying configuration information for REST web services.
Details | Description | ||
---|---|---|---|
REST / JSON Support | Choose to support REST and/or JSON in the application |
2.9 Customize User Interface
The Customize User Interface page is for specifying which fields should be included in the generated list and picker UI components. Furthermore, you can customize the table headers. By default the field names are used as the table headers, but they can be changed by clicking the field and editing the field name.
Details | Description | ||
---|---|---|---|
Table / Fields | Lists all the fields sorted by domain object and web client. These are field names used when generating UI components for the web layer. The default field names are derived from the underlying domain objects, but the field names can be changed by double-clicking a field name and entering a new value. When scaffolding multiple web clients, each web client selected from the select web client page are listed separately in this table,and the configuration of one web client affects the configuration of the other web clients. If you want to configure each web client independently (e.g., due to different requirements), then deselect the Propagate Changes to All Web Clients checkbox. | ||
List | Specifies whether or not the field name should be included in list UI components. | ||
Picker | Specifies whether or not the field name should be included in picker UI components. Currently this is applicable only to GWT web clients. |
Note: Currently the Picker UI components are generated only for GWT. If you aren’t scaffolding for GWT, the Picker column is disabled.
2.10 Specify Persistence Connection
The Specify Persistence Connection page is for configuring the runtime persistence connection of the scaffolded application by selecting a workspace database connection. The selected database connection properties are used to configure the persistence connection properties for the scaffolded application.
Details | Description | ||
---|---|---|---|
DB Connection | Lists all current MyEclipse DB connections. Select the connection that should be used to configure the application’s runtime persistence connection. |
Note: This panel is not displayed when scaffolding from a database schema because the runtime persistence connection is automatically set to the DB connection used for selecting the tables to reverse engineer for scaffolding.
2.11 Runtime Dependencies
The Runtime Dependencies page is for adding dependent libraries to the current project. While you can independently add and remove libraries from the project, this page can bootstrap the project with a full set of libraries typically needed by a Spring application, including Spring libraries plus many other runtime libraries.
You can add project dependencies in three ways:
- Copy libraries to a project folder (lib), and add libraries to the build path. Benefit: more portable projects because projects aren’t reliant on MyEclipse plugins.
- Use Eclipse classpath containers, and add classpath containers to the build path. Benefit: smaller projects because libs are included.
- Update Maven POM files. Benefit: Maven manages dependencies.
Options | Description | ||
---|---|---|---|
Add Custom JAR | Allows you to add your own JAR file to the library | ||
Remove Custom JAR | Allows you to remove your own JAR file from the library | ||
Enable project specific advanced configuration | Some add-ons appear based on other facets the project has configured. Enable this option to show all add-ons regardless of other configured facets. When disabled, you cannot select individual JARs within add-ons, you get either all JARs provided by an add-on or none of them. Enabling this option removes this restriction, allowing you to select individual JARs. |
2.12 Select Scaffolding Options
The Scaffolding options page is for specifying whether pre-existing artifacts should be updated. If these artifacts already exist in the project, you have the option of specifying whether they should be overwritten or skipped.
2.13 Select Target Folders
The Select Target Folders page is for specifying where source code, configuration files, and dependent libraries should be installed.
Note: This page is not shown when the project has the Spring DSL enabled. If the project has been enabled, then the required information in this page is derived from the code generation configuration.
Details | Description | ||
---|---|---|---|
Source Folder | Specify the destination folder forgenerated Java code. | ||
Resources Folder | Specify the destination folder forgenerated configuration files. | ||
Use JTA Transactions | Enables EntityManager creating and tracking by the container as opposed to RESOURCE_LOCAL transactions, which requires developer responsibility for EntityManager creating and tracking. | ||
Persistence Provider | Hibernate is required for JTA transactions. | ||
Application Context File | Specify the file into which application layer-specific files are imported. |
2.14 Select DB Connection (for DB scaffolding only)
The Select DB Connection page is for specifying the database connection for accessing the database tables to be reverse-engineered for scaffolding.
Details | Description | ||
---|---|---|---|
DB Connection | Lists all current MyEclipse DB connections. Select the connection for accessing DB tables. |
2.15 Select Database Tables (for DB scaffolding only)
The Select Database Tables page is for selecting database tables to be reverse-engineered for scaffolding. Select the schema where the desired database tables are located. The dialects are defaulted based on data connection properties, but they can be overridden. Select the tables, including associated tables, to be used for scaffolding.
Details | Description | ||
---|---|---|---|
Schema | Used to select the schema that includetables from which to scaffold. The schema drop-down listsall schemas from the selected database connection. | ||
Dialect | The Hibernate dialect to use thespecified database. This value is defaulted according tothe selected database connection. | ||
MetaData Dialect | The Hibernate dialect for reading metadata for allowing correct interaction with the data types in the database, generating the correct SQL, etc. | ||
Tables | The list of tables foundin the selected schema. This list is empty until a schemais selected. | ||
Scaffolding | The list of tables to beused for scaffolding. One or more tables can be added from theTables list to the scaffolding list. |
2.16 Database Scaffolding Options (for DB scaffolding only)
The Database Scaffolding Options page is for specifying parent objects and customizing object names. The table lists the objects to be generated. With scaffolding associations (e.g., one-to-many), the generated application enables associated objects to be managed as part of a parent object. Please check the objects that should be treated as parent objects. Deselected objects are treated as associated objects. The object name is automatically derived from the table name, but you can override the object name by double-clicking the name and specifying a new name.
Details | Description | ||
---|---|---|---|
Java Object | The derived name for the Java object. The Java object name is based on the table name. If table name doesn’t follow Java class naming conventions and rules, the default name could be slightly altered to conform. The Java object names can also be customized by double-clicking the name and entering a new name. You must specify at least one Java object as the parent object, which is the principle artifact(s) used for scaffolding user interfaces. | ||
Table | This is the table that the Java Object is being derived from. READ-ONLY |
2.17 Summary
The Summary panel provides a summary of all the actions to be performed by the wizard when the Finish button is clicked.
3. Add Spring Runtime Dependencies
The Add Spring Runtime Dependencies wizard is for adding dependent libraries to an Eclipse project. There are three steps to the wizard.
Add Spring Runtime Dependencies >> Intro >> Runtime Dependencies
Note: Additional pages could be included in the wizard allowing you to set Spring-specific options and capabilities settings.
3.1 Intro
The Intro page provides an overview of the wizard.
3.2 Runtime Dependencies
The Runtime Dependencies page is for adding dependent libraries to the current project. While you can independently add and remove libraries from the project, this page can bootstrap the project with a full set of libraries typically needed by a Spring application, including Spring libraries plus many other runtime libraries.
The libraries to add to the current project can be enabled or disabled by library group or library. The library groups can be expanded to see the specific libraries and versions.
Options | Description | ||
---|---|---|---|
Add Custom JAR | Allows you to add your own JAR file to the library | ||
Remove Custom JAR | Allows you to remove your own JAR file from the library | ||
Enable project specific advanced configuration | Some add-ons appear based on other facets the project has configured. Enable this option to show all add-ons regardless of other configured facets. When disabled, you cannot select individual JARs within add-ons, you get either all JARs provided by an add-on or none of them. Enabling this option removes this restriction, allowing you to select individual JARs. |
4. Scaffold Spring Security
Security is an important part of a web application, and Spring Security provides a set of services that integrate with Spring-based applications. The Scaffold Spring Security wizard configures the application for Spring Security and secure services and URLs:
- Database – using a DB security realm configured to use a scaffolded set of database tables (users and authorities)
- LDAP – using LDAP security realm
- In-Memory – using an in-memory security realm
Note: Additional pages could be included in the wizard allowing you to set Spring-specific options and capabilities settings.
Database
Scaffold Spring Security >> Overview >> Security Options [Database] >> Select Package >> Select DB Connection >> Secure Services >> Secure URLs >> Configured Views >> Summary
LDAP
Scaffold Spring Security >> Overview >> Security Options [LDAP] >> LDAP Configuration >> Secure Services >> Secure URLs >> Configured Views >> Summary
In-Memory
Scaffold Spring Security >> Overview >> Security Options [In Memory] >> Secure Services >> Secure URLs >> Configured Views >> Summary
Note: When scaffolding using the In-Memory option, the spring security context file is automatically configured with two users:
- Name: admin : Password: admin : Role: ROLE_ADMIN
- Name: user : Password: user : Role: ROLE_USER
4.1 Overview
The Overview page provides an introduction to the Scaffold Spring Security wizard.
4.2 Security Options
The Security Options page prompts you for the security type and password encoding.
Details | Description | ||
---|---|---|---|
Security Type | The list of authentication providers that can be scaffolded:
| ||
Password Encoding | The list of password encoding options:
|
4.3 Secure Services
The Secure Services page scans your project for services (@Service and @Repository components) that can be secured. By default all services are secured (checked) and configured with IS_AUTHENTICATED_REMEMBERED access. The wizard lets you unsecure the service and edit the access.
Details | Description | ||
---|---|---|---|
Service | The application service found by the wizard by scanning the current project. | ||
Secured | Specifies whether the service is to be secured. This option is enabled by default for all scanned services; however it can be disabled. | ||
Access | The access attributes for the service. This could be authentication attributes (i.e., IS_AUTHENTICATED_FULLY, IS_AUTHENTICATED_REMEMBERED, or IS_AUTHENTICATED_ANONYMOUSLY) or role names (i.e., ROLE_USER or ROLE_ADMIN). |
4.4 Secure URLs
The Secure URLs page prompts you for URLs to be secured. Unlike the Secure Services page, the wizard secures only one URL (/secure/*) by default, and you must specify (add and remove) other URLs based on your security requirements.
Details | Description | ||
---|---|---|---|
URL Pattern | The URL to be secured. | ||
Secured | Specifies whether the service is to be secured. This option is enabled by default for all scanned services; however it can be disabled. | ||
Access | The access attributes for the URL. This could be authentication attributes (i.e., IS_AUTHENTICATED_FULLY, IS_AUTHENTICATED_REMEMBERED, or IS_AUTHENTICATED_ANONYMOUSLY) or role names (i.e., ROLE_USER or ROLE_ADMIN). |
4.5 Configured Views
The Configured Views page is for specifying the URLs for various login pages.
Details | Description | ||
---|---|---|---|
Login view | The URL used to render the login page | ||
Login success view | A user will be taken to this URL after logging in, provided they were not asked to login while attempting to access a secured resource, at which they are taken to the originally requested URL. | ||
Always go to the login success view after authenticating | If selected, the user will always be directed to the login success view URL, regardless of how they arrived at the login page. | ||
Login failure view | Defines the URL the browser is redirected to on login failure. | ||
Logout success view | The destination URL the user is taken to after logging out. Defaults to “/”. | ||
Access denied view | The destination URL the user is taken to if they don’t have priviledges for the secured resource. |
4.6 Select Target Folders
The Select Target Folders page prompts you for the folder into which code is generated.
Details | Description | ||
---|---|---|---|
Source Folder | Specify the destination folder for generated Java code. | ||
Resources Folder | Specify the destination folder for generated configuration files. | ||
Use JTA Transactions | Enables EntityManager creating and tracking by the container as opposed to RESOURCE_LOCAL transactions, which requires developer responsibility for EntityManager creating and tracking. | ||
Persistence Provider | Hibernate is required for JTA transactions. | ||
Application Context File | Specify the file into which application layer-specific files are imported. |
4.7 Select Package (for DB security only)
When using the database security option, this wizard generates to JPA entities for you. The User JPA entity and UserDAO data access object is for storing user credentials. The Authorities JPA entity and AuthoritiesDAO data access object is for storing authorization data. The Select Package page prompts you for the Java package for generated code.
Details | Description | ||
---|---|---|---|
Package | The package for User/Authorities JPA entities and DAO. |
Note: The DB tables are automatically created for you, but you need to populate them with data.
4.8 Select DB Connection (for DB security only)
The Select DB Connection page prompts you for the database connection profile to be used for the persistence configuration of the User and Authorities DAOs.
Details | Description | ||
---|---|---|---|
DB Connection | Lists all available MyEclipse DB connections. Select the DB connection to be used for the persistence configuration of the DAOs. |
4.9 LDAP Configuration (for LDAP security only)
The LDAP Configuration page prompts you for the LDAP information.
Details | Description | ||
---|---|---|---|
URL | URL to the external LDAP server against which authentication takes place | ||
Manager DN | LDAP distinguished name, or full username mapping, of initial user | ||
Manager Password | Password of initial user | ||
Search Base | Organization unit in which to search for a user match | ||
Search Filter | Filter for matching user object or group membership in the directory | ||
Search Subtree | Included subtrees of the parent in the search | ||
Role Attribute | Name of the authority defined by the group | ||
Role Prefix | Assigned prefix for all authority names | ||
Convert to Uppercase | Automatically convert the role prefix to all uppercase letters |
See LDAP Authentication information at http://static.springsource.org/spring-security/site/docs/3.1.x/reference/ldap.html
4.10 Summary
The Summary page provides a summary of all the actions to be performed by the wizard when the Finish button is clicked.
5. Import WSDL
MyEclipse can be used to implement a web service contract by importing the WSDL.
Import WSDL >> Select WSDL >> Summary
Note: Additional pages could be included in the wizard allowing you to set Spring-specific options and capabilities settings.
5.1 Select WSDL
The Select WSDL File page is for specifying the WSDL URL and specifying the package in which to store files.
Details | Description | ||
---|---|---|---|
WSDL Location | URL or file location of the WSDL document | ||
Target Package | Package in which to save the imported WSDL files |
5.2 Summary
The Summary page provides a summary of all the actions to be performed by the wizard when the Finish button is clicked.
6. Enable Spring DSL
The Enable Spring DSL wizard is used to configure a project to use the Spring DSL. By default this wizard is set up with conventional defaults that enable all options. When clicking Finish from the Setup panel, default configuration options are applied to the current project. To customize the configuration, there are seven optional steps to the wizard.
Enable Spring DSL >> Intro >> Web Layer Generation >> Service Layer Generation >> Domain Layer Generation >> Data Access Layer Generation >> Runtime Dependencies >> Summary
Notes:
- The Enable Spring DSL wizard provides a lot of flexibility, but the wizard is set by default with a typical Spring DSL configuration. You can just click the Finish button from the first panel, and the default configuration is applied to the selected project.
- Additional pages could be included in the wizard allowing you to set Spring-specific options and capabilities settings.
6.1 Intro
The Intro page provides information about what the wizard will do.
6.2 Web Layer Generation
The Web Layer Generation page is used for enabling and configuring code generation for the web layer of a Spring application, including controllers (@Controller), JUnit tests, and web layer Spring context files.
If enabled, this page lets you specify the project and folders to which you want to generate. While you will typically want to generate to the same project where the code generation metadata (Spring DSL) is stored, in some cases you might want to generate to a different project. For example, you might want to keep all metadata in one project and have all code and configuration files generated to another project. Alternatively, you might want to generate each layer to a separate project. In either case, you have full control over the target project and folders.
Option | Description | ||
---|---|---|---|
Enable web layer code generation | This enables generation of web layer artifacts from code generation metadata. If disabled, any current or new web layer metadata is ignored from a code generation standpoint. Web layer code generation can always be turned on/off or customized using the Code Generation page of the Spring DSL Editor. | ||
Target Project | The target project is the destination project for web layer code generation. While you will typically want to generate to the same project where the code generation metadata is stored (Generate to this project), in some cases you might want to generate to a different project (Generate to another Eclipse project). | ||
Target Project Configuration | Specify the destination folder for generated Java code (Source folder), configuration files (Resources folder) and web content (Content). If the specified folders aren’t already configured as source folders, the Source and Resource folders are automatically added as source folders (see Java Build Path). For standard Eclipse web projects (non-Maven):
For Maven-based projects:
|
6.3 Service Layer Generation
The Service Layer Generation page is used for enabling and configuring code generation for the service layer of a Spring application, including services (@Service), service interfaces, JAX-WS web services, direct web remoting (DWR) services, JUnit tests, and service layer Spring context files.
If enabled, this page lets you specify the project and folders to which you want to generate. While you will typically want to generate to the same project where the code generation metadata (Spring DSL) is stored, in some cases you might want to generate to a different project. For example, you might want to keep metadata in one project and have all code and configuration files generated to another project. Alternatively, you might want to generate each layer to a separate project. In either case, you have full control over the target project and folders.
Option | Description | ||
---|---|---|---|
Enable service layer code generation | This enables generation of service layer artifacts from code generation metadata. If disabled, any current or new service layer metadata is ignored from a code generation standpoint. Service layer code generation can always be turned on/off or customized using the Code Generation page of the Project Editor. | ||
Target Project | The target project is the destination project for service layer code generation. While you will typically want to generate to the same project where the code generation metadata is stored (Generate to this project), in some cases you might want to generate to a different project (Generate to another Eclipse project). | ||
Target Project Configuration | Specify the destination folder for generated Java code (Source folder) and configuration files (Resources folder). If the specified folders aren’t already configured as source folders, the Source and Resource folders are automatically added as source folders (see Java Build Path). For standard Eclipse web projects (non-Maven):
For Maven-based projects:
|
6.4 Domain Layer Generation
The Domain Layer Generation page is for enabling and configuring code generation for the domain layer of a Spring application, including POJOs, primary key classes, bean info classes, JPA Entities (@Entity), Spring Components (@Component), JUnit tests, and domain https://www.genuitec.com/products/myeclipse/learning-center/spring/overview-of-myeclipse-with-spring-support/ layer Spring context files.
If enabled, this page lets you specify the project and folders to which you want to generate. While you will typically want to generate to the same project where the code generation metadata (Spring DSL) is stored, in some cases you might want to generate to a different project. For example, you might want to keep metadata in one project and have all code and configuration files generated to another project. Alternatively, you might want to generate each layer to a separate project. In either, case you have full control over the target project and folders.
Option | Description | ||
---|---|---|---|
Enable domain layer code generation | This enables generation of domain layer artifacts from code generation metadata. If disabled, any current or new domain layer metadata is ignored from a code generation standpoint. Domain layer code generation can always be turned on/off or customized using the Code Generation page of the Project Editor. | ||
Target Project | The target project is the destination project for domain layer code generation. While you will typically want to generate to the same project where the code generation metadata is stored (Generate to this project), in some cases you might want to generate to a different project (Generate to another Eclipse project). | ||
Target Project Configuration | Specify the destination folder for generated Java code (Source folder) and configuration files (Resources folder). If the specified folders aren’t already configured as source folders, the Source and Resource folders are automatically added as source folders (see Java Build Path). For standard Eclipse web projects(non-Maven):
For Maven-basedprojects:
|
6.5 Data Access Layer Generation
The Data Access Layer Generation page is used for enabling and configuring code generation for the DAO layer of a Spring application, including Spring repositories (@Repository), JUnit tests, and DAO layer Spring context files.
If enabled, this page lets you specify the project and folders to which you want to generate. While you will typically want to generate to the same project where the code generation metadata (Spring DSL) is stored, in some cases you might want to generate to a different project. For example, you might want to keep metadata in one project and have all code and configuration files generated to another project. Alternatively, you might want to generate each layer to a separate project. In either case, you have full control over the target project and folders.
Option | Description | ||
---|---|---|---|
Enable domain layer code generation | This enables generation of DAO layer artifacts from code generation metadata. If disabled, any current or new DAO layer metadata is ignored from a code generation standpoint. DAO layer code generation can always be turned on/off or customized using the Code Generation panel of the Project Editor. | ||
Target Project | The target project is the destination project for DAO layer code generation. While you will typically want to generate to the same project where the code generation metadata is stored (Generate to this project), in some cases you might want to generate to a different project (Generate to another Eclipse project). | ||
Target Project Configuration | Specify the destination folder for generated Java code (Source folder) and configuration files (Resources folder). If the specified folders aren’t already configured as source folders, the Source and Resource folders are automatically added as source folders (see Java Build Path). For standard Eclipse web projects (non-Maven):
For Maven-based projects:
|
6.6 Configure Project Libraries
The Configure Project Libraries page is for adding dependent libraries to the current project. While you can independently add and remove libraries from the project, this page can bootstrap the project with a full set of libraries typically needed by a Spring application, including Spring libraries plus many other runtime libraries.
The libraries to add to the current project can be enabled or disabled by library group or library. The library groups can be expanded to see the specific libraries and versions.
Notes:
- Beware of duplicate dependencies. When running this wizard on pre-existing projects, many of the libraries could already exist in the current project. This wizard doesn’t take into account existing libraries, so special care must be taken when adding libraries. Dependent libraries don’t have to be added using this wizard. They can always be added later using the Add Spring Runtime Dependencies wizard.
- This page adds dependencies to only the current project. If you need to add dependencies to another project (i.e., in a multi-project scenario), then you can add dependencies to the other target projects using the Add Spring Runtime Dependencies wizard.
Options | Description | ||
---|---|---|---|
Add Custom JAR | Allows you to add your own JAR file to the library | ||
Remove Custom JAR | Allows you to remove your own JAR file from the library | ||
Enable project specific advanced configuration | Some add-ons appear based on other facets the project has configured. Enable this option to show all add-ons regardless of other configured facets. When disabled, you cannot select individual JARs within add-ons, you get either all JARs provided by an add-on or none of them. Enabling this option removes this restriction, allowing you to select individual JARs. |
6.7 Summary
The Summary page provides a summary of the actions to be performed by the wizard when the Finish button is clicked.