간단한 날짜-수치 그래프에 update 버튼을 누르면 새로운 그래프가 그려진다.
index.html은 HTML에 그래프 데이터를 포함하는 웹 페이지 소스이다.
index-tsv.html은 TSV 파일의 데이터를 포함하는 웹 페이지 소스이다.
데이터 파일들은 웹 컨텍스트 루트 아래 data 디렉터리에 위치해야 한다.
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation=" | |
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd | |
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> | |
<bean id="service0200200101" class="camel.example.beanio.Service0200200101" /> | |
<camelContext xmlns="http://camel.apache.org/schema/spring"> |
package camel.example.beanio; | |
import camel.example.beanio.message.Body200101; | |
import camel.example.beanio.message.BodyCommon; | |
import camel.example.beanio.message.Header; | |
import camel.example.beanio.message.Msg0200200101; | |
import camel.example.beanio.message.Msg0210200101; | |
public class Service0200200101 { |
[INFO] Scanning for projects... | |
[INFO] | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] Building EIPs Practice 0.0.1-SNAPSHOT | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] | |
[INFO] --- exec-maven-plugin:1.2.1:exec (default-cli) @ eip-practice --- | |
Request Object <camel.example.beanio.message.Msg0200200101@16677786[ | |
header=camel.example.beanio.message.Header@62d809e7[ | |
전문길이=252 |
package camel.example.beanio.message; | |
import java.util.Date; | |
import org.apache.commons.lang.builder.ReflectionToStringBuilder; | |
import org.apache.commons.lang.builder.ToStringStyle; | |
public class Header { | |
public Integer 전문길이; | |
public String 트랜잭션코드; |
package camel.example.beanio.message; | |
import org.apache.commons.lang.builder.ReflectionToStringBuilder; | |
import org.apache.commons.lang.builder.ToStringStyle; | |
public class Msg0200200101 { | |
public Header header; | |
public BodyCommon bodyCommon; | |
public Body200101 body200101; |
<?xml version="1.0" encoding="UTF-8"?> | |
<beanio xmlns="http://www.beanio.org/2012/03" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.beanio.org/2011/01 http://www.beanio.org/2011/01/mapping.xsd"> | |
<!-- 필드 템플릿 --> | |
<template name="header"> | |
<field name="전문길이" length="4" padding="0" justify="right" /> | |
<field name="트랜잭션코드" length="6" /> | |
<field name="전문종별코드" length="4" /> | |
<field name="거래구분코드" length="6" /> |
package camel.example.beanio; | |
import camel.example.beanio.message.Body200101; | |
import camel.example.beanio.message.BodyCommon; | |
import camel.example.beanio.message.Header; | |
import camel.example.beanio.message.Msg0200200101; | |
import camel.example.beanio.message.Msg0210200101; | |
import java.util.Date; |
> mvn -DToMessage compile | |
> mvn -DToMessage exec:exec |
<dependency> | |
<groupId>org.apache.camel</groupId> | |
<artifactId>camel-beanio</artifactId> | |
<version>2.12.0</version> | |
</dependency> | |
<dependency> | |
<groupId>commons-lang</groupId> | |
<artifactId>commons-lang</artifactId> | |
<version>2.6</version> | |
<type>jar</type> |