Spring framewrok Batch の Example を見てみよう
はじめに
spring framework を使ってみようということで
http://www.springsource.org/downloads/sts-ggts
で配布されている、 Eclipse 込みの、all-in-one distribution を
download-install-open してみました
興味のある Spring Batch の Project を Eclipse の New Project、
Spring Template Project で作り、
そのソースを見ようとしたんですが
Eclipse が落ちて見れませんでした
多分Junoが悪いと決め付けて
Indigo を落とし、そちらへ、 Spring tool suite を入れてみることにしました
WinXP 32bit 上で行っています。
eclipse indigo インストール
Eclipse Indigo Sr2 Packages の Windows 32-bit を download-install
http://www.eclipse.org/downloads/packages/release/indigo/sr2
spring tool suite インストール
http://www.springsource.org/STS-installation-instructions
のたまわく、「installはマーケットプレースが楽チンだぜ」なので
そうしました
引用:
Install via Eclipse Marketplace
Probably the easiest way to get the Spring and/or the Groovy/Grails tooling installed into an existing
Eclipse installation is to use the Eclipse Marketplace Client. Open that Marketplace Client and search for
“Spring Tool Suite” or “Groovy/Grails Tool Suite” (“tool suite”, “sts”, and “ggts” also work nicely as search
strings).Choose the right item for your Eclipse platform, press “Install” and you are done.
Help > Eclipse Marketplace.. を開きます
Find に “Spring Tool Suite” と入力し検索します
Spring Tool Suite (STS) for Eclipse Indigo (3.7)
が見つかると思います
Install を押します
Install、再起動し Eclipse を開きます
File > New > Project... を開きます
Spring > Spring Template Project を開きます
Batch > Simple Spring Batch Project を選び、 Next を押します
じゃんじゃんdownloadしてもらいます
スクリーンショット撮る前に Next を押しちゃったんで
入力できない風の画面になってますが
必要事項を入力します
最下段の package 名は a.b.c 形式でないとダメみたい
(your project name) > src/main/java > (your.package.name) > ExampleItemReader.java
とか開くと "Hello world!" とかあるので、お手本感を味わえます
おしまい (´-`)