たとえば、mule-config.xml
ファイルに
- -始める
spring:bean id="objPool" class="org.apache.commons.pool.impl.GenericObjectPool"
spring:property name="whenExhaustedAction" value="#
{org.apache.commons.pool.impl.GenericObjectPool.WHEN_EXHAUSTED_GROW}"
- -終わり
ここで、WHEN_EXHAUSTED_GROW は public static final バイトで、その値は 2 です。
するとmule -config mule-config.xml
、次のエラーが表示されます
エラー:
org.mule.api.lifecycle.InitialisationException: Initialisation Failure: Error creating bean with name 'videoRequestSAXParserObjectPool' defined in URL [file:/home/joshlabs/codebase/collider-server-tidal/src/main/resources/mule-config-pingback.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type [byte] for property 'whenExhaustedAction'; nested exception is java.lang.NumberFormatException: For input string: "{org.apache.commons.pool.impl.GenericObjectPool.WHEN_EXHAUSTED_GROW}"
「バイト」データ型を「文字列」データ型に変換する方法を教えてください。
ありがとう、プリンス