Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release-6u2-hotfix'
Browse files Browse the repository at this point in the history
  • Loading branch information
tisuchida committed Oct 3, 2024
2 parents a1a3b46 + 6bb6355 commit 91ae923
Show file tree
Hide file tree
Showing 18 changed files with 135 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.. _customize-db:

=======================================================
Procedure for Changing the RDBMS used
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,27 @@ This procedure shows the configuration method to use the gsp-dba-maven-plugin in
It is also not intended to be used in such a way that the DDL generated by the tool from the ER diagram is directly placed in the production environment and executed.
When creating DDL for the production environment by using the DDL generated by the tool, it is the DBA's responsibility to make sure that there are no problems with the DDL.

Prerequisites
====================================================
Configure the generate-entity goal to work with Java 17 and later
========================================================================

Entity classes can be automatically generated by running the generate-entity goal, but to use it with Java 17 or later, you need to set a JVM option.

Refer to the following to set up.

The following projects are covered.
`generate-entity(external site) <https://github.com/coastland/gsp-dba-maven-plugin/blob/main/en/README.md#generate-entity>`_

File modification
===========================

This procedure covers the following projects.

* Various projects that have implemented :doc:`CustomizeDB` procedures after generation from archetypes.

.. tip::

gsp-dba-maven-plugin is configured to use H2 Database Engine (hereinafter H2) by default.

The following steps are not required if H2 is used. Perform only :ref:`confirm_gsp`.


File modification
===========================
If you are using H2, the file modification steps described here are not necessary.


Modification of the pom.xml file
Expand Down Expand Up @@ -177,6 +182,7 @@ Communication confirmation
* generate-ddl
* execute-ddl
* generate-entity
* load-data
* export-schema
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,13 @@ If the communication confirmation fails for some unknown reason, the correct pro
If the reason is not known, try again from :ref:`firstStepGenerateBatchEEBlankProject`.


Configure the database
----------------------------------------

The blank project is initially configured to use the H2 Database Engine. To change the RDBMS to be used, refer to :ref:`customize-db` for the configuration.

In addition, to generate and execute DDL from ER diagrams and automatically generate entity classes, you need to initialize and run gsp-dba-maven-plugin. For details, see :ref:`gsp-maven-plugin`.


Supplementary notes
--------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,13 @@ If the communication confirmation fails for some unknown reason, the correct pro
If the reason is not known, try again from :ref:`firstStepGenerateBatchBlankProject`.


Configure the database
----------------------------------------

The blank project is initially configured to use the H2 Database Engine. To change the RDBMS to be used, refer to :ref:`customize-db` for the configuration.

In addition, to generate and execute DDL from ER diagrams and automatically generate entity classes, you need to initialize and run gsp-dba-maven-plugin. For details, see :ref:`gsp-maven-plugin`.


Supplementary notes
--------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,14 @@ If the communication confirmation fails for some unknown reason, the correct pro
If the reason is not known, try again from :ref:`firstStepGenerateWebBlankProject`.


Configure the database
----------------------------------------

The blank project is initially configured to use the H2 Database Engine. To change the RDBMS to be used, refer to :ref:`customize-db` for the configuration.

In addition, to generate and execute DDL from ER diagrams and automatically generate entity classes, you need to initialize and run gsp-dba-maven-plugin. For details, see :ref:`gsp-maven-plugin`.


Supplementary information (web.xml)
------------------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,13 @@ If the communication confirmation fails for some unknown reason, the correct pro
If the reason is not known, try again from :ref:`firstStepGenerateJaxrsBlankProject`.


Configure the database
----------------------------------------

The blank project is initially configured to use the H2 Database Engine. To change the RDBMS to be used, refer to :ref:`customize-db` for the configuration.

In addition, to generate and execute DDL from ER diagrams and automatically generate entity classes, you need to initialize and run gsp-dba-maven-plugin. For details, see :ref:`gsp-maven-plugin`.


Supplementary notes
--------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,15 @@ It works the same as for :ref:`Communication confirmation (messaging using table
If the startup is successful, a log similar to :ref:`Launching the application <firstStepBatchExecDbMessagingBatch>` will be output to the console.
It will go into standby mode, so force quit it with ctrl+c after confirming.


Configure the database
----------------------------------------

The blank project is initially configured to use the H2 Database Engine. To change the RDBMS to be used, refer to :ref:`customize-db` for the configuration.

In addition, to generate and execute DDL from ER diagrams and automatically generate entity classes, you need to initialize and run gsp-dba-maven-plugin. For details, see :ref:`gsp-maven-plugin`.


Supplementary notes
--------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,14 @@ To delete a container, execute the following command.
docker rm myapp-container-web
Configure the database
----------------------------------------

The blank project is initially configured to use the H2 Database Engine. To change the RDBMS to be used, refer to :ref:`customize-db` for the configuration.

In addition, to generate and execute DDL from ER diagrams and automatically generate entity classes, you need to initialize and run gsp-dba-maven-plugin. For details, see :ref:`gsp-maven-plugin`.


Supplementary notes
--------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,14 @@ The way to run the container image is the same as in a web project for container
* ``http://localhost:8080/find/xml``


Configure the database
----------------------------------------

The blank project is initially configured to use the H2 Database Engine. To change the RDBMS to be used, refer to :ref:`customize-db` for the configuration.

In addition, to generate and execute DDL from ER diagrams and automatically generate entity classes, you need to initialize and run gsp-dba-maven-plugin. For details, see :ref:`gsp-maven-plugin`.


Supplementary notes
--------------------

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.. _customize-db:

======================================
使用するRDBMSの変更手順
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,27 @@ gsp-dba-maven-pluginは、使用開始前にRDBMSにあわせて設定する必
ER図からツールによって生成されたDDLをそのまま本番環境に配置して実行するというような使い方も想定していない。
ツールによって生成されたDDLを流用して本番環境向けのDDLを作成する場合はDBAの責任でDDLに問題ないかを確認すること。

前提
====================================================
generate-entityゴールがJava17以降で動くように設定する
======================================================

generate-entityゴールを実行することによりEntityクラスを自動生成できるが、Java 17以降で利用するにはJVMオプションを設定する必要がある。

以下を参照して設定する。

以下のプロジェクトを対象とする。
`generate-entity(外部サイト) <https://github.com/coastland/gsp-dba-maven-plugin/blob/main/README.md#generate-entity>`_

ファイル修正
===========================

この手順は、以下のプロジェクトを対象とする。

* アーキタイプから生成後、:doc:`CustomizeDB` の手順を実施した各種プロジェクト。

.. tip::

gsp-dba-maven-pluginはデフォルトでH2 Database Engine(以下H2)を使うように設定されている。

H2を使用する場合は、以降の手順は不要である。 :ref:`confirm_gsp` だけ行うこと。


ファイル修正
===========================
H2を使用する場合は、ここで記載しているファイル修正の手順は不要である。


pom.xmlファイルの修正
Expand Down Expand Up @@ -176,6 +181,7 @@ src/main/resources/entity以下にRDBMS毎にedmファイルが存在するの
* generate-ddl
* execute-ddl
* generate-entity
* load-data
* export-schema
Expand Down Expand Up @@ -289,7 +295,7 @@ SI Object Browser ER 以外のモデリングツールを使用する場合は
</plugins>
</build>
修正後に以下のコマンドを実行することでEntity クラスの生成、テストデータの登録、ダンプファイルの作成が行われる。
修正後に以下のコマンドを実行することでEntityクラスの生成、テストデータの登録、ダンプファイルの作成が行われる。
なお、コマンド実行前に任意の方法でデータベースを構築する必要がある。

.. code-block:: bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,13 @@ batchlet方式のバッチアプリケーションでは、SAMPLE_USERテーブ
原因が分からない場合は、:ref:`firstStepGenerateBatchEEBlankProject` からやり直してみること。


データベースに関する設定を行う
------------------------------------

ブランクプロジェクトは、初期状態ではH2 Database Engineを使用するように設定されている。使用するRDBMSを変更する場合は、:ref:`customize-db` を参照して設定すること。

またER図からのDDL生成や実行、Entityクラスの自動生成を行うにはgsp-dba-maven-pluginの初期設定および実行を行う。詳細は :ref:`gsp-maven-plugin` を参照。


補足
--------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,13 @@ SampleAction バッチアプリケーション実装する際に一
原因が分からない場合は、:ref:`firstStepGenerateBatchBlankProject` からやり直してみること。


データベースに関する設定を行う
------------------------------------

ブランクプロジェクトは、初期状態ではH2 Database Engineを使用するように設定されている。使用するRDBMSを変更する場合は、:ref:`customize-db` を参照して設定すること。

またER図からのDDL生成や実行、Entityクラスの自動生成を行うにはgsp-dba-maven-pluginの初期設定および実行を行う。詳細は :ref:`gsp-maven-plugin` を参照。


補足
--------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,12 @@ package パッケージ(通常はグループIDと同じ) ``com.examp

原因が分からない場合は、:ref:`firstStepGenerateWebBlankProject` からやり直してみること。

データベースに関する設定を行う
------------------------------------

ブランクプロジェクトは、初期状態ではH2 Database Engineを使用するように設定されている。使用するRDBMSを変更する場合は、:ref:`customize-db` を参照して設定すること。

またER図からのDDL生成や実行、Entityクラスの自動生成を行うにはgsp-dba-maven-pluginの初期設定および実行を行う。詳細は :ref:`gsp-maven-plugin` を参照。

補足(web.xml)
--------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,13 @@ FireFoxまたはChromeを起動し、以下のURLをアドレスバーに入力
原因が分からない場合は、:ref:`firstStepGenerateJaxrsBlankProject` からやり直してみること。


データベースに関する設定を行う
------------------------------------

ブランクプロジェクトは、初期状態ではH2 Database Engineを使用するように設定されている。使用するRDBMSを変更する場合は、:ref:`customize-db` を参照して設定すること。

またER図からのDDL生成や実行、Entityクラスの自動生成を行うにはgsp-dba-maven-pluginの初期設定および実行を行う。詳細は :ref:`gsp-maven-plugin` を参照。


補足
--------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,14 @@ package パッケージ(通常はグループIDと同じ) ``com.examp
待機状態となるので、確認後はctrl+c等で強制終了させる。


データベースに関する設定を行う
------------------------------------

ブランクプロジェクトは、初期状態ではH2 Database Engineを使用するように設定されている。使用するRDBMSを変更する場合は、:ref:`customize-db` を参照して設定すること。

またER図からのDDL生成や実行、Entityクラスの自動生成を行うにはgsp-dba-maven-pluginの初期設定および実行を行う。詳細は :ref:`gsp-maven-plugin` を参照。


補足
--------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,14 @@ package パッケージ(通常はグループIDと同じ) ``com.examp
docker rm myapp-container-web
データベースに関する設定を行う
------------------------------------

ブランクプロジェクトは、初期状態ではH2 Database Engineを使用するように設定されている。使用するRDBMSを変更する場合は、:ref:`customize-db` を参照して設定すること。

またER図からのDDL生成や実行、Entityクラスの自動生成を行うにはgsp-dba-maven-pluginの初期設定および実行を行う。詳細は :ref:`gsp-maven-plugin` を参照。


補足
--------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,13 @@ package パッケージ(通常はグループIDと同じ) ``com.examp
* ``http://localhost:8080/find/xml``


データベースに関する設定を行う
------------------------------------

ブランクプロジェクトは、初期状態ではH2 Database Engineを使用するように設定されている。使用するRDBMSを変更する場合は、:ref:`customize-db` を参照して設定すること。

またER図からのDDL生成や実行、Entityクラスの自動生成を行うにはgsp-dba-maven-pluginの初期設定および実行を行う。詳細は :ref:`gsp-maven-plugin` を参照。


補足
--------------------
Expand Down

0 comments on commit 91ae923

Please sign in to comment.