This is an automated email from the ASF dual-hosted git repository. liuhongyu pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/shenyu.git
The following commit(s) were added to refs/heads/master by this push: new ef5af25cc9 fix shenyu-examples-springmvc start failed (#5661) (#5664) ef5af25cc9 is described below commit ef5af25cc98ff257b5eba3f91f6170d157c66e4f Author: Wweiei <45253632+wwe...@users.noreply.github.com> AuthorDate: Thu Sep 19 23:05:21 2024 +0800 fix shenyu-examples-springmvc start failed (#5661) (#5664) --- .../src/main/resources/context/shenyu.xml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/shenyu-examples/shenyu-examples-springmvc/src/main/resources/context/shenyu.xml b/shenyu-examples/shenyu-examples-springmvc/src/main/resources/context/shenyu.xml index ba85c0a1f5..9e2f734723 100644 --- a/shenyu-examples/shenyu-examples-springmvc/src/main/resources/context/shenyu.xml +++ b/shenyu-examples/shenyu-examples-springmvc/src/main/resources/context/shenyu.xml @@ -22,8 +22,9 @@ <bean id="springMvcClientEventListener" class="org.apache.shenyu.client.springmvc.init.SpringMvcClientEventListener"> - <constructor-arg ref="clientPropertiesConfig"/> + <constructor-arg ref="shenyuClientConfig"/> <constructor-arg ref="clientRegisterRepository"/> + <constructor-arg ref="env"/> </bean> <!-- config ShenyuRegisterCenterConfig according to your registerType --> @@ -38,6 +39,16 @@ </property> </bean> + <bean id="env" class="org.springframework.core.env.StandardEnvironment" /> + + <bean id="shenyuClientConfig" class="org.apache.shenyu.register.common.config.ShenyuClientConfig"> + <property name="client"> + <map> + <entry key="http" value-ref="clientPropertiesConfig"/> + </map> + </property> + </bean> + <!-- ClientPropertiesConfig --> <bean id="clientPropertiesConfig" class="org.apache.shenyu.register.common.config.ShenyuClientConfig.ClientPropertiesConfig">