Java Spring: Error message "no declaration can be found for element 'util:constant'

后端 未结 1 528
猫巷女王i
猫巷女王i 2021-02-06 23:57

I\'m trying to use util-constant for ioc but I\'m getting the following error message:

cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can          


        
相关标签:
1条回答
  • 2021-02-07 00:31

    This is the correct declaration of util namespace (don't forget about specifying schemaLocation):

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:util="http://www.springframework.org/schema/util"
       xsi:schemaLocation="
         http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
         http://www.springframework.org/schema/util  http://www.springframework.org/schema/util/spring-util-3.1.xsd">
    
    
    </beans>
    

    See more at C.2.2 The util schema.

    0 讨论(0)
提交回复
热议问题