[JAVA] Create a base for your batch processing project in Eclipse.

This article describes how to create a batch processing project in Eclipse by fumbling and trial and error.

Prerequisite work:

    1. Download spring-tool-suite from the following site and extract it to a suitable location. (Example: C: \ pleiades , etc.) Download destination: https://spring.io/tools/sts/all
  1. Start Eclipse and specify C: \ pleiades \ sts-3.9.2.RELEASE expanded in 1. as WorkSpace and start it.

Project creation work:

    1. In Package Explorer, right-click-> New-> Project-> Spring Starter Project. image.png
  1. Enter a name-> Here, enter BatchTestApp and click Next. image.png

    1. Check the batch and click the Finish button to finish. image.png
  2. The main function that runs the batch process is automatically generated. image.png

  3. Right-click BatchTestApplication.java and click Debug-> Java Application to run it. image.png

  4. that? , Will result in an error. image.png

Exception in thread "main" java.lang.NoClassDefFoundError:org/springframework/core/env/EnvironmentCapable When I look it up, I get an error that the org / springframework / core / env / EnvironmentCapable class cannot be found.

  1. Check pom.xml. image.png

After a lot of trial and error, the cause is that the version of spring-boot-startar-parent in pom.xml is 1.5.9.RELEASE. Try it with the source code of BatchTestApplication.java When I try to type import org.springframework.core.env.EnvironmentCapable ;, I get an error saying that the imported org.springframework.core.env.EnvironmentCapable cannot be found.

  1. Modify pom.xml. (Set the version to 1.2.1.RELEASE) image.png

  2. Right-click BatchTestApplication.java again and click Debug-> Java Application to run it. image.png

I don't know why 1.5.9.RELEASE doesn't have a class, but Spring is now working.

Recommended Posts

Create a base for your batch processing project in Eclipse.
Create a simple batch processing framework in Eclipse.
Create a Jetty project using Eclipse
Create a tomcat project using Eclipse
Create a Java project using Eclipse
Create a tomcat project using Eclipse Pleiades All in One
Create a Servlet program in Eclipse
Create a tool for name identification in Salesforce
Create a Docker container for your development web server in Ansible on MacOS
[CentOS, Eclipse] Load a library file in a C project
How to create a Spring Boot project in IntelliJ
[Spring Boot] How to create a project (for beginners)
How to create a data URI (base64) in Java
Create a MySQL container for application testing in Ansible AWX
Programmatically import a Maven project from your own Eclipse plugin
How to create a new Gradle + Java + Jar project in Intellij 2016.03
Create a database in a production environment
Create a new app in Rails
Create your own encode for String.getBytes ()
Create a Maven project with a command
Create a fluentd server for testing
Create a Spring Boot project in intellij and exit immediately after launching
Make the context root a project folder in an Eclipse dynamic web project
Building a Lambda development environment in Eclipse
Create a simple on-demand batch with Spring Batch
How to create a Maven repository for 2020
Create Java Spring Boot project in IntelliJ
Enable code completion in Eclipse for Mac
Create a TODO app in Java 7 Create Header
Deploy a Tomcat-based Eclipse project on Heroku
CI for Maven project in Azure Pipelines
[For beginners] How to debug in Eclipse
Create an animation in which characters emerge for a moment using molecular dynamics