This article describes how to create a batch processing project in Eclipse by fumbling and trial and error.
Project creation work:
Enter a name-> Here, enter BatchTestApp and click Next.
The main function that runs the batch process is automatically generated.
Right-click BatchTestApplication.java and click Debug-> Java Application to run it.
that? , Will result in an error.
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.
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.
Modify pom.xml. (Set the version to 1.2.1.RELEASE)
Right-click BatchTestApplication.java again and click Debug-> Java Application to run it.
I don't know why 1.5.9.RELEASE doesn't have a class, but Spring is now working.