O'Reilly logo

Mastering Spring Application Development by Anjana Mankale

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Developing a sample batch application

Now that we have covered the basics of batch processing and the components of Spring Batch, let's develop a simple example in which names starting with $$ are recognized as nonvegetarian food items and names starting with ## are vegetarian. Names that do not start with either of these characters need to be ignored. Our job must generate an HTML string with the font color red for nonvegetarian recipes and a green font color for vegetarian recipes.

You need to create a Maven project named recipeMarker with the previously mentioned dependency. Also add all the Spring Framework core dependencies. We shall work on the context.xml file. We need to configure the job repository and job launcher.

Look at the applicationContext.xml ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required