Migration Guide 5.0.2_en - terasolunaorg/terasoluna-gfw GitHub Wiki

目次

1. Guide for migration from 5.0.1 to 5.0.2

1.1. Key changes in 5.0.2

The key changes in 5.0.2 are as below.

  • Updated the Spring Framework to 4.1.9

  • Updated Apache Commons Collections to 3.2.2

  • Updated the Spring IO Platform to 1.1.5

  • Updated MyBatis to 3.3.0

  • Upgraded blank project

1.1.1. Updating the Spring Framework to 4.1.9

The Spring Framework has been updated to 4.1.9.RELEASE to resolve the security vulnerability from 5.0.2.

  • [CVE-2015-5211] RFD Attack in Spring Framework ([SPR-13548] Protect against RFD exploits)

  • [CVE-2015-4852] [SPR-13656] SerializableTypeWrapper.MethodInvokeTypeProvider can be exploited for unsafe deserialization

1.1.2. Updating Apache Commons Collections to 3.2.2

Apache Commons Collections has been updated to 3.2.2 to resolve the security vulnerability from 5.0.2.

  • [CVE-2015-4852] [COLLECTIONS-580] Arbitrary remote code execution with InvokerTransformer

1.1.3. Updating the Spring IO Platform to 1.1.5

The Spring IO Platform has been updated to 1.1.5.RELEASE from 5.0.2. This update has been performed to resolve the above 2 security vulnerabilities and also the following libraries have been updated as a result of it.

  • Updated the Spring Security to 3.2.9.RELEASE

  • Updated the Spring Data Commons to 1.9.4.RELEASE

  • Updated the Spring Data JPA to 1.7.4.RELEASE

  • Updated the AspectJ to 1.8.7

  • Updated the Hibernate ORM to 4.3.11.Final

  • Updated SLF4J to 1.7.13

1.1.4. Updating MyBatis to 3.3.0

MyBatis has been updated to 3.3.0 to incorporate the following bug fixes from 5.0.2. MyBatis Spring has been updated to 1.2.3 along with this update.

  • [#464] Bug fix support for MyBatis unexpected NPE

Further, the default library to be used while "Lazy Load"ing the related Entity has been changed in line with this update. The default library has been changed from CGLIB to JAVASSIST.
Refer to Guideline - settings for Lazy Loading the related Entity for the details.

1.1.5. Upgrading the blank project

Some configuration files in blank project have been upgraded from 5.0.2.

1.2. Procedures for migration from 5.0.1 to 5.0.2

The migration procedures are as follows.

Note

Legend

Required : This procedure is mandatory
Required by case : This procedure is mandatory if conditions match
Optional : This procedure is recommended. (Implement it as required)
- : This procedure is not required

[General]

Step Procedure MavenMultiple Projects MavenSingle Project EclipseWTP Project

1.

Update the dependent library

Required

Required

Required

[Upgrading the blank project]

Step Procedure MavenMultiple Projects MavenSingle Project EclipseWTP Project

2.

Change the set value for "hibernate.hbm2ddl.auto"

Optional

Optional

Optional

3.

Servlet3.0 settings to disable URL rewriting

Optional

Optional

Optional

4.

Delete unnecessary repository information

Required

Required

Required

5.

Correct the mistake in writing property name

Optional

Optional

Optional

6.

Change in the settings as per the update to MyBatis3.3.0

Optional

Optional

Optional

7.

Change the path to be used in DB initialization process to absolute path

Optional

-

-

8.

Settings to read property file during test

Required

-

-

9.

Settings to use build-helper-maven-plugin

Optional

-

-

10.

Wild card settings at the time of reading code list file

-

Optional(※)

Optional(※)

11.

Use of cargo-maven2-plugin

Optional

Optional

Optional

(※)The targeted project between the MavenSingle Project and the EclipseWTP Project is the blank project wherein MyBatis and JPA are used. Blank project having no DB settings is not considered (already having settings).

1.2.1. [Step 1] Updating dependent library

Update the common library and dependent library of TERASOLUNA Server Framework for Java (5.x).

Library name Version before update Version after update Remarks

TERASOLUNA Server Framework for Java (5.x) Common Library

5.0.1.RELEASE

5.0.2.RELEASE

Spring Framework

4.1.7.RELEASE

4.1.9.RELEASE

Spring Security

3.2.7.RELEASE

3.2.9.RELEASE

Spring Data Commons

1.9.3.RELEASE

1.9.4.RELEASE

Spring Data JPA

1.7.3.RELEASE

1.7.4.RELEASE

Hibernate

4.3.10.Final

4.3.11.Final

AspectJ

1.8.6

1.8.7

SLF4J

1.7.12

1.7.13

[Procedure’s required cases]

This procedure is mandatory. Two security vulnerabilities and MyBatis bug is resolved when this update is applied.

[Step 1-1] In case of using Maven Multiple Projects

This update procedure is for the project created using mvn archetype.

Update the pom file for the parent project. ("$YOUR_MULTIPLE_PROJECT_ROOT/pom.xml")

[Before modification]

<!-- omitted -->
<parent>
    <groupId>org.terasoluna.gfw</groupId>
    <artifactId>terasoluna-gfw-parent</artifactId>
    <version>5.0.1.RELEASE</version> <!-- ### Location to be modified ### -->
</parent>
<!-- omitted -->

[After modification]

<!-- omitted -->
<parent>
    <groupId>org.terasoluna.gfw</groupId>
    <artifactId>terasoluna-gfw-parent</artifactId>
    <version>5.0.2.RELEASE</version> <!-- ### Modified location ### -->
</parent>
<!-- omitted -->
[Step 1-2] In case of using Maven Single Project

This update procedure is for the project created using mvn archetype or the project downloaded from release site.

Update the pom file for the project. ("$YOUR_SINGLE_PROJECT/pom.xml")

[Before modification]

<!-- omitted -->
<parent>
    <groupId>org.terasoluna.gfw</groupId>
    <artifactId>terasoluna-gfw-parent</artifactId>
    <version>5.0.1.RELEASE</version> <!-- ### Location to be modified ### -->
</parent>
<!-- omitted -->

[After modification]

<!-- omitted -->
<parent>
    <groupId>org.terasoluna.gfw</groupId>
    <artifactId>terasoluna-gfw-parent</artifactId>
    <version>5.0.2.RELEASE</version> <!-- ### Modified location ### -->
</parent>
<!-- omitted -->
[Step 1-3] In case of using Eclipse WTP Project

This update procedure is for the Eclipse WTP project downloaded from release site.

Refer to Updating library while using Eclipse WTP Project for the update procedure.

1.2.2. [Step 2] Changing set value for "hibernate.hbm2ddl.auto"

The value of "hibernate.hbm2ddl.auto" has been changed from "none" to "" (blank character) from 5.0.2. The following unnecessary log related to Hibernate is no longer output because of this.

date:2015-08-13 13:06:12 thread:RMI TCP Connection(2)-127.0.0.1  X-Track:    level:WARN  logger:org.hibernate.cfg.SettingsFactory                message:Unrecognized value for "hibernate.hbm2ddl.auto": none

The value "none" set in 5.0.1 and previous versions was not supported by Hibernate. When "hibernate.hbm2ddl.auto" is not used, it is not required to set anything in the value.

[Procedure’s required case]

This procedure is optional, but since unnecessary warning log is output when "hibernate.hbm2ddl.auto" is not used, it is recommended to perform the following modifications to handle it.

[Method of modification]

Modify the default value in any one of the following files in the JPA project.

  • $YOUR_MULTIPLE_PROJECT_ROOT/xxx-domain/src/main/resources/META-INF/spring/projectName-infra.xml

  • $YOUR_SINGLE_PROJECT/src/main/resources/META-INF/spring/projectName-infra.xml

  • $YOUR_ECLIPSE_WTP_PROJECT/src/main/resources/META-INF/spring/projectName-infra.xml

[Before modification]

<!-- omitted -->
<bean
    class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"
    id="entityManagerFactory">
    <property name="packagesToScan" value="test.domain.model" />
    <property name="dataSource" ref="dataSource" />
    <property name="jpaVendorAdapter" ref="jpaVendorAdapter" />
    <property name="jpaPropertyMap">
        <util:map>
            <entry key="hibernate.hbm2ddl.auto" value="none" /> <!-- ### Location to be modified ### -->
            <entry key="hibernate.ejb.naming_strategy"
                value="org.hibernate.cfg.ImprovedNamingStrategy" />
<!-- omitted -->

[After modification]

<!-- omitted -->
<bean
    class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"
    id="entityManagerFactory">
    <property name="packagesToScan" value="test.domain.model" />
    <property name="dataSource" ref="dataSource" />
    <property name="jpaVendorAdapter" ref="jpaVendorAdapter" />
    <property name="jpaPropertyMap">
        <util:map>
            <entry key="hibernate.hbm2ddl.auto" value="" /> <!-- ### Modified location ### -->
            <entry key="hibernate.ejb.naming_strategy"
                value="org.hibernate.cfg.ImprovedNamingStrategy" />
<!-- omitted -->

1.2.3. [Step 3] Servlet3.0 settings to disable URL rewriting

Servlet3.0 settings to disable URL rewriting have been incorporated from 5.0.2. Refer to GitHub multi#179 for the detailed information.

[Procedure’s required case]

This procedure is optional, but it is recommended to apply it from the security point of view.

This procedure need not be implemented in the following case.

  • When the implementation in Cookie as the method to handle the session ID between a client and a server is difficult and it is necessary to perform URL rewriting

[Method of modification]

Add the settings in any one of the files below.

  • $YOUR_MULTIPLE_PROJECT_ROOT/xxx-web/src/main/webapp/WEB-INF/web.xml

  • $YOUR_SINGLE_PROJECT/src/main/webapp/WEB-INF/web.xml

  • $YOUR_ECLIPSE_WTP_PROJECT/src/main/webapp/WEB-INF/web.xml

[Before modification]

<!-- omitted -->
<session-config>
    <!-- 30min -->
    <session-timeout>30</session-timeout>
</session-config>
<!-- omitted -->

[After modification]

<!-- omitted -->
<session-config>
    <!-- 30min -->
    <session-timeout>30</session-timeout>
    <cookie-config>                       <!-- ### Added location ### -->
        <http-only>true</http-only>       <!-- ### Added location ### -->
        <!-- <secure>true</secure> -->    <!-- ### Added location ### -->
    </cookie-config>                      <!-- ### Added location ### -->
    <tracking-mode>COOKIE</tracking-mode> <!-- ### Added location ### -->
</session-config>
<!-- omitted -->

1.2.4. [Step 4] Deleting unnecessary repository information

Unnecessary repository information has been deleted from 5.0.2.

[Procedure’s required case]

This procedure is mandatory. Since this repository information is not required, perform the following modifications to handle it.

[Method of modification]

Delete the settings in any one of the following files.

  • $YOUR_MULTIPLE_PROJECT_ROOT/pom.xml

  • $YOUR_SINGLE_PROJECT/pom.xml

  • $YOUR_ECLIPSE_WTP_PROJECT/pom.xml

[Before modification]

<!-- omitted -->
    <repository>
        <releases>
            <enabled>false</enabled>
        </releases>
        <snapshots>
        </snapshots>
        <id>terasoluna-gfw-snapshots</id>
        <url>http://repo.terasoluna.org/nexus/content/repositories/terasoluna-gfw-snapshots/</url>
    </repository>
    <repository>                                                                                  <!-- ### Location to be deleted ### -->
        <releases>                                                                                <!-- ### Location to be deleted ### -->
        </releases>                                                                               <!-- ### Location to be deleted ### -->
        <snapshots>                                                                               <!-- ### Location to be deleted ### -->
            <enabled>false</enabled>                                                              <!-- ### Location to be deleted ### -->
        </snapshots>                                                                              <!-- ### Location to be deleted ### -->
        <id>terasoluna-gfw-3rdparty</id>                                                          <!-- ### Location to be deleted ### -->
        <url>http://repo.terasoluna.org/nexus/content/repositories/terasoluna-gfw-3rdparty/</url> <!-- ### Location to be deleted ### -->
    </repository>                                                                                 <!-- ### Location to be deleted ### -->
</repositories>
<!-- omitted -->

[After modification]

<!-- omitted -->
    <repository>
        <releases>
            <enabled>false</enabled>
        </releases>
        <snapshots>
        </snapshots>
        <id>terasoluna-gfw-snapshots</id>
        <url>http://repo.terasoluna.org/nexus/content/repositories/terasoluna-gfw-snapshots/</url>
    </repository>
</repositories>
<!-- omitted -->

1.2.5. [Step 5] Correcting mistake in writing property name

The property name set incorrectly has been corrected from "-maven-plugi" to " -maven-plugin " from 5.0.2.

[Procedure’s required case]

This procedure is optional, but perform the following modifications for the writing error as far as possible.

[Method of modification]

Modify the settings in any one of the following files.

  • $YOUR_MULTIPLE_PROJECT_ROOT/pom.xml

  • $YOUR_SINGLE_PROJECT/pom.xml

  • $YOUR_ECLIPSE_WTP_PROJECT/pom.xml

[Before modification]

<!-- omitted -->
<properties>
    <java-version>1.7</java-version>
    <org.codehaus.mojo.build-helper-maven-plugi.version>1.9.1</org.codehaus.mojo.build-helper-maven-plugi.version> <!-- ### Location to be modified ### -->
</properties>
<!-- omitted -->

<!-- omitted -->
<build>
    <pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>${org.codehaus.mojo.build-helper-maven-plugi.version}</version> <!-- ### Location to be modified ### -->
                <executions>
<!-- omitted -->

[After modification]

<!-- omitted -->
<properties>
    <java-version>1.7</java-version>
    <org.codehaus.mojo.build-helper-maven-plugin.version>1.9.1</org.codehaus.mojo.build-helper-maven-plugin.version> <!-- ### Modified location ### -->
</properties>
<!-- omitted -->

<!-- omitted -->
<build>
    <pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>${org.codehaus.mojo.build-helper-maven-plugin.version}</version> <!-- ### Modified location ### -->
                <executions>
<!-- omitted -->

1.2.6. [Step 6] Change in settings because of the update to MyBatis3.3.0

The default settings for the library used to implement "Lazy Load" have been changed from CGLIB to JAVASSIST because of the update to MyBaits3.3.0 from 5.0.2.

[Procedure’s required cases]

This procedure is optional, but this procedure need not be implemented in the following 2 cases.

  • Not applicable case 1: When "Lazy Load" is not used

  • Not applicable case 2: When "Lazy Load" is used and the libraries used explicitly by "dependency" of "pom.xml" configuration file and "proxyFactory" of "mybatis-config.xml" configuration file are specified

This procedure is required for the case where "Lazy Load" is implemented by the default library (when the settings for the library are not implemented explicitly). Implement any one of the following 2 procedures at the time of migration to 5.0.2 depending on whether to change the library used and to follow the default library of MyBatis3.3.0 or whether to follow the policy of not changing the library before the migration.

  • Step 6-1: When default library of MyBatis is used (JAVASSIST is used)

  • Step 6-2: When the library before the migration is not changed (CGLIB is used)

[Step 6-1] When default library of MyBatis is used (JAVASSIST is used)

This is the case where JAVASSIST that is a default library of MyBatis3.3.0 is used as the library used to implement "Lazy Load" by this procedure. Delete the CGLIB settings used before the migration.

[Method of modification]

Modify the settings in any one of the following files in MyBatis project.

  • $YOUR_MULTIPLE_PROJECT_ROOT/pom.xml

  • $YOUR_SINGLE_PROJECT/pom.xml

  • $YOUR_ECLIPSE_WTP_PROJECT/pom.xml

[Before modification]

<!-- omitted -->
        <dependency>                       <!-- ### Location to be deleted ### -->
            <groupId>cglib</groupId>       <!-- ### Location to be deleted ### -->
            <artifactId>cglib</artifactId> <!-- ### Location to be deleted ### -->
            <version>3.1</version>         <!-- ### Location to be deleted ### -->
            <scope>runtime</scope>         <!-- ### Location to be deleted ### -->
        </dependency>                      <!-- ### Location to be deleted ### -->
<!-- omitted -->

[After modification]

<!-- omitted -->
     <!-- none -->
<!-- omitted -->
[Step 6-2] When library before migration is not changed (CGLIB is used)

This is the case where CGLIB is used as the library used to implement "Lazy Load" by this procedure. Add the CGLIB settings so that JAVASSIST becomes as default in MyBatis3.3.0.

[Method of modification]

Modify the settings in any one of the following files in MyBatis project.

  • $YOUR_MULTIPLE_PROJECT_ROOT/xxx-domain/src/main/resources/META-INF/mybatis/mybatis-config.xml

  • $YOUR_SINGLE_PROJECT/src/main/resources/META-INF/mybatis/mybatis-config.xml

  • $YOUR_ECLIPSE_WTP_PROJECT/src/main/resources/META-INF/mybatis/mybatis-config.xml

[Before modification]

<!-- omitted -->
<!-- See http://mybatis.github.io/mybatis-3/configuration.html#settings -->
<settings>
    <setting name="mapUnderscoreToCamelCase" value="true" />
    <setting name="lazyLoadingEnabled" value="true" />
    <setting name="aggressiveLazyLoading" value="false" />
<!-- ### Locations to be deleted Start ### -->
<!--
    <setting name="defaultExecutorType" value="REUSE" />
    <setting name="jdbcTypeForNull" value="NULL" />
    <setting name="proxyFactory" value="JAVASSIST" />
    <setting name="localCacheScope" value="STATEMENT" />
-->
<!-- ### Locations to be deleted End ### -->
</settings>
<!-- omitted -->

[After modification]

<!-- omitted -->
<!-- See http://mybatis.github.io/mybatis-3/configuration.html#settings -->
<settings>
    <setting name="mapUnderscoreToCamelCase" value="true" />
    <setting name="lazyLoadingEnabled" value="true" />
    <setting name="aggressiveLazyLoading" value="false" />
<!-- ### Added locations Start ### -->
<!-- Default value for proxyFactory has changed to JAVASSIST since mybatis 3.3.0.
 To use CGLIB as a proxyFactory, remove this comment and add dependency for CGLIB in pom.xml -->
    <setting name="proxyFactory" value="CGLIB" />
<!-- ### Added locations End ### -->
</settings>
<!-- omitted -->

1.2.7. [Step 7] Changing path used in DB initialization process to absolute path

The path used in DB initialization process has been changed to the absolute path from 5.0.2.

[Procedure’s required case]

This procedure is optional. It is recommended to perform the following modification to avoid the occurrence of the path acquisition error that depends on the execution environment.

[Method of modification]

Modify the settings in the following file.

  • $YOUR_MULTIPLE_PROJECT_ROOT/xxx_initdb/pom.xml

[Before modification]

<!-- omitted -->
        <properties>
            <db.encoding>UTF8</db.encoding>
            <db.basedir>src/main/sqls/postgres</db.basedir> <!-- ### Location to be modified ### -->
            <db.url>jdbc:postgresql://127.0.0.1:5432/projectName</db.url>
            <db.username>postgres</db.username>
<!-- omitted -->

[After modification]

<!-- omitted -->
        <properties>
            <db.encoding>UTF8</db.encoding>
            <db.basedir>${project.basedir}/src/main/sqls/postgres</db.basedir> <!-- ### Modified location ### -->
            <db.url>jdbc:postgresql://127.0.0.1:5432/projectName</db.url>
            <db.username>postgres</db.username>
<!-- omitted -->

1.2.8. [Step 8] Settings to read property file during test

Settings to read property file during test have been added from 5.0.2. The property file can be read during the test execution because of this.

[Procedure’s required case]

This procedure is mandatory. Perform the following modification to handle the incorrect settings.

[Method of modification]

Modify the settings in the following file.

  • $YOUR_MULTIPLE_PROJECT_ROOT/xxx_domain/src/test/resources/test-context.xml

[Before modification]

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">

    <import resource="classpath:META-INF/spring/def-domain.xml" />

    <bean class="org.springframework.jdbc.core.JdbcTemplate">
        <property name="dataSource" ref="dataSource" />
    </bean>
</beans>

[After modification]

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context" <!-- ### Added location ### -->
       xsi:schemaLocation="
         http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
         http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd <!-- ### Added location ### -->
       ">

    <context:property-placeholder                                  <!-- ### Added location ### -->
            location="classpath*:/META-INF/spring/*.properties" /> <!-- ### Added location ### -->

    <bean id="exceptionLogger" class="org.terasoluna.gfw.common.exception.ExceptionLogger" /> <!-- ### Added location ### -->

    <import resource="classpath:META-INF/spring/def-domain.xml" />

    <bean class="org.springframework.jdbc.core.JdbcTemplate">
        <property name="dataSource" ref="dataSource" />
    </bean>

</beans>

1.2.9. [Step 9] Settings to use build-helper-maven-plugin

Settings to use build-helper-maven-plugin have been added from 5.0.2. Source folders and resource folders can be added because of this.

[Procedure’s required case]

This procedure is optional. Perform the following modifications when source folders are to be added.

[Method of modification]

Add the settings in the following files.

  • $YOUR_MULTIPLE_PROJECT_ROOT/xxx_domain/pom.xml

  • $YOUR_MULTIPLE_PROJECT_ROOT/xxx_selenium/pom.xml

  • $YOUR_MULTIPLE_PROJECT_ROOT/xxx_web/pom.xml

[Before modification]

<!-- omitted -->
     <!-- none -->
<!-- omitted -->

[After modification]

<!-- omitted -->
<build>                                                        <!-- ### Added location ### -->
    <plugins>                                                  <!-- ### Added location ### -->
        <plugin>                                               <!-- ### Added location ### -->
            <groupId>org.codehaus.mojo</groupId>               <!-- ### Added location ### -->
            <artifactId>build-helper-maven-plugin</artifactId> <!-- ### Added location ### -->
        </plugin>                                              <!-- ### Added location ### -->
    </plugins>                                                 <!-- ### Added location ### -->
</build>                                                       <!-- ### Added location ### -->
<!-- omitted -->

1.2.10. [Step 10] Wild card settings while reading code list file

Wild card settings while reading the code list file have been enabled from 5.0.2. The set of code list files that matches to the settings can be read because of this.

[Procedure’s required case]

This procedure is optional. Perform the following modifications when the code list is to be used.

[Method of modification]

Modify the settings in any one of the following files.

  • $YOUR_SINGLE_PROJECT/src/main/resources/META-INF/spring/xxx-domain.xml

  • $YOUR_ECLIPSE_WTP_PROJECT/src/main/resources/META-INF/spring/xxx-domain.xml

[Before modification]

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
    xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
        http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
        http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">

    <import resource="classpath:META-INF/spring/projectName-infra.xml" />

    <context:component-scan base-package="xxxxxx.yyyyyy.zzzzzz.domain" />

    <tx:annotation-driven /> <!-- ### Location to be modified ### -->
<!-- omitted -->

[After modification]

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
    xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
        http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
        http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">

    <tx:annotation-driven /> <!-- ### Modified location ### -->

    <import resource="classpath:META-INF/spring/projectName-infra.xml" />
    <import resource="classpath*:META-INF/spring/**/*-codelist.xml" /> <!-- ### Added location ### -->

    <context:component-scan base-package="xxxxxx.yyyyyy.zzzzzz.domain" />

<!-- omitted -->

1.2.11. [Step 11] Using cargo-maven2-plugin

Settings to use cargo-maven2-plugin have been added from 5.0.2. Tomcat8 can be used with these settings.

Refer to Codehaus Cargo - Maven2 plugin for the details regarding cargo-maven2-plugin.

[Procedure’s required case]

This procedure is optional. Refer to the following method when Tomcat8 is to be used.

[How to use]

Execute the following command just below "$YOUR_PROJECT_ROOT".

[Multi blank project]

[Advance preparation] Creating war file

$ mvn clean package

[Execution] Tomcat8 execution

$ mvn -f xxx-web/pom.xml cargo:run

[Single blank project]

[Advance preparation] Creating war file

$ mvn clean package

[Execution] Tomcat8 execution

$ mvn cargo:run

1.3. Appendix for 5.0.2

1.3.1. Updating libraries while using Eclipse WTP Project

This update procedure is for the Eclipse WTP project downloaded from release site.

Note

Legend

[Table header]

Non : Blank project that is independent of O/R Mapper
MB3 : Blank project for MyBatis3
JPA : Blank project for JPA

[Remarks column]

* : Operation target

[Step 2]

Terminate Eclipse if it is running.

[Step 3]

Update (delete and add) jar file of "$YOUR_ECLIPSE_WTP_PROJECT/src/main/webapp/WEB-INF/lib".

Library name Deleted file Added file Non MB3 JPA

TERASOLUNA Server Framework for Java (5.x) Common Library

terasoluna-gfw-common-5.0.1.RELEASE.jar

terasoluna-gfw-common-5.0.2.RELEASE.jar

*

*

*

terasoluna-gfw-web-5.0.1.RELEASE.jar

terasoluna-gfw-web-5.0.2.RELEASE.jar

*

*

*

terasoluna-gfw-security-core-5.0.1.RELEASE.jar

terasoluna-gfw-security-core-5.0.2.RELEASE.jar

*

*

*

terasoluna-gfw-security-web-5.0.1.RELEASE.jar

terasoluna-gfw-security-web-5.0.2.RELEASE.jar

*

*

*

terasoluna-gfw-mybatis3-5.0.1.RELEASE.jar

terasoluna-gfw-mybatis3-5.0.2.RELEASE.jar

*

terasoluna-gfw-jpa-5.0.1.RELEASE.jar

terasoluna-gfw-jpa-5.0.2.RELEASE.jar

*

terasoluna-gfw-jodatime-5.0.1.RELEASE.jar

terasoluna-gfw-jodatime-5.0.2.RELEASE.jar

*

*

*

Spring Framework

spring-aop-4.1.7.RELEASE.jar

spring-aop-4.1.9.RELEASE.jar

*

*

*

spring-aspects-4.1.7.RELEASE.jar

spring-aspects-4.1.9.RELEASE.jar

*

*

*

spring-beans-4.1.7.RELEASE.jar

spring-beans-4.1.9.RELEASE.jar

*

*

*

spring-context-4.1.7.RELEASE.jar

spring-context-4.1.9.RELEASE.jar

*

*

*

spring-context-support-4.1.7.RELEASE.jar

spring-context-support-4.1.9.RELEASE.jar

*

*

*

spring-core-4.1.7.RELEASE.jar

spring-core-4.1.9.RELEASE.jar

*

*

*

spring-expression-4.1.7.RELEASE.jar

spring-expression-4.1.9.RELEASE.jar

*

*

*

spring-jdbc-4.1.7.RELEASE.jar

spring-jdbc-4.1.9.RELEASE.jar

*

*

*

spring-orm-4.1.7.RELEASE.jar

spring-orm-4.1.9.RELEASE.jar

*

*

*

spring-tx-4.1.7.RELEASE.jar

spring-tx-4.1.9.RELEASE.jar

*

*

*

spring-web-4.1.7.RELEASE.jar

spring-web-4.1.9.RELEASE.jar

*

*

*

spring-webmvc-4.1.7.RELEASE.jar

spring-webmvc-4.1.9.RELEASE.jar

*

*

*

Spring Data Commons

spring-data-commons-1.9.3.RELEASE.jar

spring-data-commons-1.9.4.RELEASE.jar

*

*

*

Spring Security

spring-security-acl-3.2.7.RELEASE.jar

spring-security-acl-3.2.9.RELEASE.jar

*

*

*

spring-security-config-3.2.7.RELEASE.jar

spring-security-config-3.2.9.RELEASE.jar

*

*

*

spring-security-core-3.2.7.RELEASE.jar

spring-security-core-3.2.9.RELEASE.jar

*

*

*

spring-security-taglibs-3.2.7.RELEASE.jar

spring-security-taglibs-3.2.9.RELEASE.jar

*

*

*

spring-security-web-3.2.7.RELEASE.jar

spring-security-web-3.2.9.RELEASE.jar

*

*

*

Hibernate

hibernate-core-4.3.10.Final.jar

hibernate-core-4.3.11.Final.jar

*

hibernate-entitymanager-4.3.10.Final.jar

hibernate-entitymanager-4.3.11.Final.jar

*

Spring Data JPA

spring-data-jpa-1.7.3.RELEASE.jar

spring-data-jpa-1.7.4.RELEASE.jar

*

AspectJ

aspectjrt-1.8.6.jar

aspectjrt-1.8.7.jar

*

*

*

aspectjweaver-1.8.6.jar

aspectjweaver-1.8.7.jar

*

*

*

Commons Collections

commons-collections-3.2.1.jar

commons-collections-3.2.2.jar

*

*

*

MyBatis

mybatis-3.2.8.jar

mybatis-3.3.0.jar

*

MyBatis Spring

mybatis-spring-1.2.2.jar

mybatis-spring-1.2.3.jar

*

SLF4J

jcl-over-slf4j-1.7.12.jar

jcl-over-slf4j-1.7.13.jar

*

*

*

slf4j-api-1.7.12.jar

slf4j-api-1.7.13.jar

*

*

*

[Step 4]

Update (delete and add) jar file of "$YOUR_ECLIPSE_WTP_PROJECT/testlib".

Library name Deleted file Added file Non MB3 JPA

H2 Database Engine

h2-1.4.187.jar

h2-1.4.190.jar

*

*

Mockito

mockito-core-1.10.8.jar

mockito-core-1.10.19.jar

*

*

*

Spring TestContext Framework

spring-test-4.1.7.RELEASE.jar

spring-test-4.1.9.RELEASE.jar

*

*

*

Tomcat Embed El

tomcat-embed-el-7.0.59.jar

tomcat-embed-el-7.0.67.jar

*

*

*

[Step 5]

Update (delete and add) jar file for storing the source of "$YOUR_ECLIPSE_WTP_PROJECT/libsrc".

Library name Deleted file Added file Non MB3 JPA

TERASOLUNA Server Framework for Java (5.x) Common Library

terasoluna-gfw-common-5.0.1.RELEASE-sources.jar

terasoluna-gfw-common-5.0.2.RELEASE-sources.jar

*

*

*

terasoluna-gfw-web-5.0.1.RELEASE-sources.jar

terasoluna-gfw-web-5.0.2.RELEASE-sources.jar

*

*

*

terasoluna-gfw-security-core-5.0.1.RELEASE-sources.jar

terasoluna-gfw-security-core-5.0.2.RELEASE-sources.jar

*

*

*

terasoluna-gfw-security-web-5.0.1.RELEASE-sources.jar

terasoluna-gfw-security-web-5.0.2.RELEASE-sources.jar

*

*

*

terasoluna-gfw-mybatis3-5.0.1.RELEASE-sources.jar

terasoluna-gfw-mybatis3-5.0.2.RELEASE-sources.jar

*

terasoluna-gfw-jpa-5.0.1.RELEASE-sources.jar

terasoluna-gfw-jpa-5.0.2.RELEASE-sources.jar

*

terasoluna-gfw-jodatime-5.0.1.RELEASE-sources.jar

terasoluna-gfw-jodatime-5.0.2.RELEASE-sources.jar

*

*

*

Spring Framework

spring-aop-4.1.7.RELEASE-sources.jar

spring-aop-4.1.9.RELEASE-sources.jar

*

*

*

spring-aspects-4.1.7.RELEASE-sources.jar

spring-aspects-4.1.9.RELEASE-sources.jar

*

*

*

spring-beans-4.1.7.RELEASE-sources.jar

spring-beans-4.1.9.RELEASE-sources.jar

*

*

*

spring-context-4.1.7.RELEASE-sources.jar

spring-context-4.1.9.RELEASE-sources.jar

*

*

*

spring-context-support-4.1.7.RELEASE-sources.jar

spring-context-support-4.1.9.RELEASE-sources.jar

*

*

*

spring-core-4.1.7.RELEASE-sources.jar

spring-core-4.1.9.RELEASE-sources.jar

*

*

*

spring-expression-4.1.7.RELEASE-sources.jar

spring-expression-4.1.9.RELEASE-sources.jar

*

*

*

spring-jdbc-4.1.7.RELEASE-sources.jar

spring-jdbc-4.1.9.RELEASE-sources.jar

*

*

*

spring-orm-4.1.7.RELEASE-sources.jar

spring-orm-4.1.9.RELEASE-sources.jar

*

*

*

spring-tx-4.1.7.RELEASE-sources.jar

spring-tx-4.1.9.RELEASE-sources.jar

*

*

*

spring-web-4.1.7.RELEASE-sources.jar

spring-web-4.1.9.RELEASE-sources.jar

*

*

*

spring-webmvc-4.1.7.RELEASE-sources.jar

spring-webmvc-4.1.9.RELEASE-sources.jar

*

*

*

Spring Data Commons

spring-data-commons-1.9.3.RELEASE-sources.jar

spring-data-commons-1.9.4.RELEASE-sources.jar

*

*

*

Spring Security

spring-security-acl-3.2.7.RELEASE-sources.jar

spring-security-acl-3.2.9.RELEASE-sources.jar

*

*

*

spring-security-config-3.2.7.RELEASE-sources.jar

spring-security-config-3.2.9.RELEASE-sources.jar

*

*

*

spring-security-core-3.2.7.RELEASE-sources.jar

spring-security-core-3.2.9.RELEASE-sources.jar

*

*

*

spring-security-taglibs-3.2.7.RELEASE-sources.jar

spring-security-taglibs-3.2.9.RELEASE-sources.jar

*

*

*

spring-security-web-3.2.7.RELEASE-sources.jar

spring-security-web-3.2.9.RELEASE-sources.jar

*

*

*

Hibernate

hibernate-core-4.3.10.Final-sources.jar

hibernate-core-4.3.11.Final-sources.jar

*

hibernate-entitymanager-4.3.10.Final-sources.jar

hibernate-entitymanager-4.3.11.Final-sources.jar

*

Spring Data JPA

spring-data-jpa-1.7.3.RELEASE-sources.jar

spring-data-jpa-1.7.4.RELEASE-sources.jar

*

AspectJ

aspectjrt-1.8.6-sources.jar

aspectjrt-1.8.7-sources.jar

*

*

*

aspectjweaver-1.8.6-sources.jar

aspectjweaver-1.8.7-sources.jar

*

*

*

Commons Collections

commons-collections-3.2.1-sources.jar

commons-collections-3.2.2-sources.jar

*

*

*

MyBatis

mybatis-3.2.8-sources.jar

mybatis-3.3.0-sources.jar

*

MyBatis Spring

mybatis-spring-1.2.2-sources.jar

mybatis-spring-1.2.3-sources.jar

*

SLF4J

jcl-over-slf4j-1.7.12-sources.jar

jcl-over-slf4j-1.7.13-sources.jar

*

*

*

slf4j-api-1.7.12-sources.jar

slf4j-api-1.7.13-sources.jar

*

*

*

H2 Database Engine

h2-1.4.187-sources.jar

h2-1.4.190-sources.jar

*

*

Mockito

mockito-core-1.10.8-sources.jar

mockito-core-1.10.19-sources.jar

*

*

*

Spring TestContext Framework

spring-test-4.1.7.RELEASE-sources.jar

spring-test-4.1.9.RELEASE-sources.jar

*

*

*

Tomcat Embed El

tomcat-embed-el-7.0.59-sources.jar

tomcat-embed-el-7.0.67-sources.jar

*

*

*

[Step 6]

Update the reference library using replacement string.

  • $YOUR_ECLIPSE_WTP_PROJECT/.classpath

  • $YOUR_ECLIPSE_WTP_PROJECT/build.xml

Library name Characters to be replaced Replacement characters Non MB3 JPA

TERASOLUNA Server Framework for Java (5.x) Common Library

terasoluna-gfw-common-5.0.1.RELEASE

terasoluna-gfw-common-5.0.2.RELEASE

*

*

*

terasoluna-gfw-web-5.0.1.RELEASE

terasoluna-gfw-web-5.0.2.RELEASE

*

*

*

terasoluna-gfw-security-core-5.0.1.RELEASE

terasoluna-gfw-security-core-5.0.2.RELEASE

*

*

*

terasoluna-gfw-security-web-5.0.1.RELEASE

terasoluna-gfw-security-web-5.0.2.RELEASE

*

*

*

terasoluna-gfw-mybatis3-5.0.1.RELEASE

terasoluna-gfw-mybatis3-5.0.2.RELEASE

*

terasoluna-gfw-jpa-5.0.1.RELEASE

terasoluna-gfw-jpa-5.0.2.RELEASE

*

terasoluna-gfw-jodatime-5.0.1.RELEASE

terasoluna-gfw-jodatime-5.0.2.RELEASE

*

*

*

Spring Framework

spring-aop-4.1.7.RELEASE

spring-aop-4.1.9.RELEASE

*

*

*

spring-aspects-4.1.7.RELEASE

spring-aspects-4.1.9.RELEASE

*

*

*

spring-beans-4.1.7.RELEASE

spring-beans-4.1.9.RELEASE

*

*

*

spring-context-4.1.7.RELEASE

spring-context-4.1.9.RELEASE

*

*

*

spring-context-support-4.1.7.RELEASE

spring-context-support-4.1.9.RELEASE

*

*

*

spring-core-4.1.7.RELEASE

spring-core-4.1.9.RELEASE

*

*

*

spring-expression-4.1.7.RELEASE

spring-expression-4.1.9.RELEASE

*

*

*

spring-jdbc-4.1.7.RELEASE

spring-jdbc-4.1.9.RELEASE

*

*

*

spring-orm-4.1.7.RELEASE

spring-orm-4.1.9.RELEASE

*

*

*

spring-tx-4.1.7.RELEASE

spring-tx-4.1.9.RELEASE

*

*

*

spring-web-4.1.7.RELEASE

spring-web-4.1.9.RELEASE

*

*

*

spring-webmvc-4.1.7.RELEASE

spring-webmvc-4.1.9.RELEASE

*

*

*

Spring Data Commons

spring-data-commons-1.9.3.RELEASE

spring-data-commons-1.9.4.RELEASE

*

*

*

Spring Security

spring-security-acl-3.2.7.RELEASE

spring-security-acl-3.2.9.RELEASE

*

*

*

spring-security-config-3.2.7.RELEASE

spring-security-config-3.2.9.RELEASE

*

*

*

spring-security-core-3.2.7.RELEASE

spring-security-core-3.2.9.RELEASE

*

*

*

spring-security-taglibs-3.2.7.RELEASE

spring-security-taglibs-3.2.9.RELEASE

*

*

*

spring-security-web-3.2.7.RELEASE

spring-security-web-3.2.9.RELEASE

*

*

*

Hibernate

hibernate-core-4.3.10.Final

hibernate-core-4.3.11.Final

*

hibernate-entitymanager-4.3.10.Final

hibernate-entitymanager-4.3.11.Final

*

Spring Data JPA

spring-data-jpa-1.7.3.RELEASE

spring-data-jpa-1.7.4.RELEASE

*

AspectJ

aspectjrt-1.8.6

aspectjrt-1.8.7

*

*

*

aspectjweaver-1.8.6

aspectjweaver-1.8.7

*

*

*

Commons Collections

commons-collections-3.2.1

commons-collections-3.2.2

*

*

*

MyBatis

mybatis-3.2.8

mybatis-3.3.0

*

MyBatis Spring

mybatis-spring-1.2.2

mybatis-spring-1.2.3

*

SLF4J

jcl-over-slf4j-1.7.12

jcl-over-slf4j-1.7.13

*

slf4j-api-1.7.12

slf4j-api-1.7.13

*

*

*

H2 Database Engine

h2-1.4.187

h2-1.4.190

*

*

Mockito

mockito-core-1.10.8

mockito-core-1.10.19

*

*

*

Spring TestContext Framework

spring-test-4.1.7.RELEASE

spring-test-4.1.9.RELEASE

*

*

*

Tomcat Embed El

tomcat-embed-el-7.0.59

tomcat-embed-el-7.0.67

*

*

*

⚠️ **GitHub.com Fallback** ⚠️