【问题标题】:cvc-complex-type.2.4.a: Invalid content was found starting with element 'filter-regex'cvc-complex-type.2.4.a:发现以元素“filter-regex”开头的无效内容
【发布时间】:2019-01-26 16:31:05
【问题描述】:

在eclipse中编辑applicationContext.xml时,如下内容

<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:发现以元素“filter-regex”开头的无效内容。 '{"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"]}' 是预期的。

我用谷歌搜索了这个错误,有些地方说订单很重要。我尝试重新排列 bean 内的项目,但错误仍然存​​在。

怎么了?

【问题讨论】:

    标签: xml spring-mvc applicationcontext


    【解决方案1】:

    架构中为&lt;bean&gt; 元素定义的内容模型似乎与您尝试生成的内容完全无关。这表明存在严重错误:您已将 Eclipse 配置为使用错误的架构进行验证,您使用了错误的命名空间,或类似的事情。

    【讨论】:

      猜你喜欢
      • 2018-03-04
      • 1970-01-01
      • 1970-01-01
      • 2020-10-31
      • 2011-07-07
      • 2018-12-23
      • 1970-01-01
      • 1970-01-01
      • 2018-08-24
      相关资源
      最近更新 更多