【发布时间】:2014-11-20 11:19:10
【问题描述】:
我正在使用 Apache-cxf (JAX-RS) 和 spring 框架。我的 beans.xml 中有以下示例代码。
<jaxrs:server id="services" address="${http.server}">
<jaxrs:properties>
<entry key="attachment-max-size" value="1024" />
</jaxrs:properties>
<jaxrs:serviceBeans>
<bean id="mainResource" class="com.abc.rest.api.MainResource">
<lookup-method name="createEmployeeCollectionResource"
bean="employeeCollectionResource" />
</bean>
...
...other beans
...
</jaxrs:serviceBeans>
</jaxrs:server>
我也有以下代码
<bean id="employeeCollectionResource"
class="com.abc.rest.services.EmployeeCollectionResourceImpl">
<lookup-method name="createNewEmployeeResource" bean="employeeResource" />
</bean>
<bean id="employeeResource" scope="prototype"
class="com.abc.rest.services.EmployeeResourceImpl">
</bean>
我已将所有服务上传期间的最大文件大小设置为 1KB。
我怎样才能特别限制 attachment-max-size 对于少数 bean?示例 - 少数 bean 5MB,其他少数 2MB 等
【问题讨论】:
标签: java spring apache cxf jax-rs