Skip to content

Commit 8632a90

Browse files
committed
Updating gitignore agian and merge usecase 1
1 parent 406af5e commit 8632a90

File tree

7 files changed

+39
-3
lines changed

7 files changed

+39
-3
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
routing/target
2+
routing/activemq-data
3+
routing/src/data/error
4+
routing/src/data/outbox
-32 MB
Binary file not shown.
-32 KB
Binary file not shown.
-28 KB
Binary file not shown.
-8 Bytes
Binary file not shown.

routing/src/main/resources/META-INF/spring/camel-context.xml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,42 @@
7777

7878
<camelContext trace="false" xmlns="http://camel.apache.org/schema/spring">
7979
<propertyPlaceholder location="fabric8/route.properties" id="properties"/>
80+
<endpoint
81+
uri="dozer:transformCSV?unmarshalId=csv&amp;marshalId=myjson&amp;mappingFile=transformations/csv2json.xml&amp;targetModel=org.globex.Account"
82+
id="transform" />
8083
<dataFormats>
8184
<json library="Jackson" unmarshalTypeName="org.globex.Account" id="json"/>
85+
<json library="Jackson" id="myjson" />
86+
<bindy type="Csv" classType="org.acme.Customer" id="csv" />
8287
</dataFormats>
88+
89+
90+
91+
<onException>
92+
<exception>java.lang.IllegalArgumentException</exception>
93+
<handled>
94+
<constant>true</constant>
95+
</handled>
96+
<to uri="{{fileError}}" />
97+
</onException>
98+
99+
<route>
100+
101+
102+
<from uri="{{fileInput}}" />
103+
<split>
104+
<tokenize token="\n"></tokenize>
105+
<to ref="transform" />
106+
<to uri="{{fileOutput}}" />
107+
</split>
108+
</route>
109+
110+
111+
112+
113+
114+
115+
83116
<route id="RestService">
84117
<from uri="cxfrs:bean:customerRestService?bindingStyle=SimpleConsumer"/>
85118
<bean ref="changeGeo"/>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
fileInput=???
2-
fileOutput=???
3-
fileError=???
1+
fileInput=file://src/data/inbox?fileName=customers.csv&noop=true
2+
fileOutput=file://src/data/outbox?fileName=csv-record-${date:now:yyyyMMdd}.txt
3+
fileError=file://src/data/error?fileName=account-${property.CamelSplitIndex}.json

0 commit comments

Comments
 (0)