42.2. Spring Boot Auto-Configuration

구성 요소는 아래 나열된 5 가지 옵션을 지원합니다.

이름설명기본값유형

camel.dataformat.base64.content-type-header

데이터 형식이 데이터 형식에서 수행할 수 있는 경우 데이터 형식의 유형으로 Content-Type 헤더를 설정해야 하는지 여부입니다. 예를 들어 데이터 형식을 XML로 마샬링하거나, JSon으로 마샬링되는 데이터 형식에 대한 application/json 등이 있습니다.

false

부울

camel.dataformat.base64.enabled

base64 데이터 형식 활성화

true

부울

camel.dataformat.base64.line-length

인코딩된 데이터의 최대 줄 길이를 지정합니다. 76 기본적으로 사용됩니다.

76

정수

camel.dataformat.base64.line-separator

사용할 줄 구분 기호입니다. 기본적으로 새 줄 문자(CRLF)를 사용합니다.

 

문자열

camel.dataformat.base64.url-safe

'' 및 '/'를 내보내는 대신 '-' 및 '_'를 각각 내보냅니다. urlSafe는 작업 인코딩에만 적용됩니다. 디코딩은 두 모드를 모두 원활하게 처리합니다. 기본값은 false입니다.

false

부울

ND

Spring DSL에서는 다음 태그를 사용하여 데이터 형식을 구성합니다.

<camelContext>
    <dataFormats>
        <!-- for a newline character (\n), use the HTML entity notation coupled with the ASCII code. -->
        <base64 lineSeparator="&#10;" id="base64withNewLine" />
        <base64 lineLength="64" id="base64withLineLength64" />
    </dataFormats>
    ...
</camelContext>

그런 다음 나중에 해당 참조를 사용할 수 있습니다.

<route>
     <from uri="direct:startEncode" />
     <marshal ref="base64withLineLength64" />
     <to uri="mock:result" />
</route>

대부분의 경우 기본 옵션을 사용하는 경우 데이터 형식을 선언할 필요가 없습니다. 이 경우 다음과 같이 인라인 데이터 형식을 선언할 수 있습니다.In that case, you can declare the data format inline as shown below.