При редактировании applicationContext.xml в eclipse следующее содержимое
<bean name = "data-bus" class = "XXX.mvp.databus.OnlineClassDatabusConfiguration">
<filter-regex>vip_oc.online_class, vip.student</filter-regex>
<poll-timeout>300</poll-timeout>
<auto-offset-reset-config>earliest</auto-offset-reset-config>
<group-id>test</group-id>s
<topic-test1>vip_oc</topic-test1>
<topic-test2>vip</topic-test2>
<bootstrap-servers>127.0.0.1:9092</bootstrap-servers>
<max-poll-records>300</max-poll-records>
</bean>
вызывает ошибку:
cvc-complex-type.2.4.a: Invalid content was found starting with element 'filter-regex'. One of '{"http:// www.springframework.org/schema/beans":description, "http://www.springframework.org/schema/ beans":meta, "http://www.springframework.org/schema/beans":constructor-arg, "http:// www.springframework.org/schema/beans":property, "http://www.springframework.org/schema/ beans":qualifier, "http://www.springframework.org/schema/beans":lookup-method, "http:// www.springframework.org/schema/beans":replaced-method, WC[##other:"http:// www.springframework.org/schema/beans"]}' is expected.
Я погуглил об ошибке, и в некоторых местах говорится, что порядок имеет значение .. Я попытался переупорядочить элемент внутри bean-компонента, но ошибка все еще существует.
Что случилось?
Модель контента, определенная в схеме для элемента <bean>
, кажется, совершенно не связана с контентом, который вы пытаетесь создать. Это говорит о том, что что-то в корне не так: вы настроили Eclipse для проверки с неправильной схемой, вы используете неправильное пространство имен или что-то в этом роде.