Skip to content

Commit

Permalink
Merge pull request #3 from zahidMed/master
Browse files Browse the repository at this point in the history
Add comments
  • Loading branch information
zahidMed authored Apr 9, 2021
2 parents fe0f775 + 1a27fd6 commit 314f04f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@

import org.springframework.batch.core.JobParameter;

/**
* Customized generic class that inherits {@link JobParameter}in order to bypass the restriction made
* by spring batch for parameter types (String, Date, Double,Long).
* This class was copied from StackOverflow
*
* <a href="https://stackoverflow.com/questions/33761730/how-to-send-a-custom-object-as-job-parameter-in-spring-batch">Question link</a>
*
*/
public class CustomJobParameter<T extends Serializable> extends JobParameter {

private static final long serialVersionUID = -5137416276827316303L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
import com.digibooster.spring.batch.listener.JobExecutionContextListener;
import com.digibooster.spring.batch.util.CustomJobParameter;

/**
* This class restores the Locale context inside the Spring batch job
* @author Mohammed ZAHID <[email protected]>
*
*/
public class JobExecutionLocaleContextListener implements JobExecutionContextListener {

private final Logger log = LoggerFactory.getLogger(JobExecutionLocaleContextListener.class);
Expand Down

0 comments on commit 314f04f

Please sign in to comment.