- 전체
- JAVA 일반
- JAVA 수학
- JAVA 그래픽
- JAVA 자료구조
- JAVA 인공지능
- JAVA 인터넷
- Java Framework
- Java GUI (AWT,SWING,SWT,JFACE)
- SWT and RCP (web RAP/RWT)[eclipse], EMF
JAVA 자료구조 Spring Batch to Read From MongoDB and Generate XML Files
2020.09.21 22:03
Spring Batch to Read From MongoDB and Generate XML Files
We take a look at how to use these two popular and open source database projects together to generate XML file versions of our data.
This article is all about how to use Spring Batch jobs to read data from a Mongo Collection and generate an XML file. This will be very useful for generating reports out of mongoDB using Spring Batch. I was really struggling to get a running Maven project of Spring Batch with MongoDB read operations to generate XML when I was researching it via various internet sources. This running project might be helpful.
Technology stack:
- Java 8
- Maven 3.5.2
- Spring Boot 1.5.2
- MongoDB 3.6
The complete, running Maven project can be downloaded from my GitHub repo.
1. pom.xml File
2) application.properties
3) Spring Batch Jobs
Create a job that will read from Mongodb and write into an XML file.
4) Fetching a Record From the MongoDB Employee Collection to an Object and Writing it to an XML File.
5) MongoDB Data Insert
6) Run the Application
7) Output
Hope this will help you to understand Spring Batch with MongoDB read operations. Happy learning!
[출처] https://dzone.com/articles/spring-batch-to-read-from-mongodb-and-generate-xml
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.
댓글 0
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
|---|---|---|---|---|
| 1 |
numerical analysis with java examples - turhancoban.com.pdf
| 졸리운_곰 | 2016.06.07 | 512 |

