-1

I'm totally a noob and i'm trying to follow a Spring beginners guide. In the dispatcher servlet declaration (named DefaulServlet) i get this error: cvc-complex-type.2.4.c: matching wildcard is strict but no declaration can be found for element context component scan.

The code in the xml file is

<?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:mvc="http://www.springframework.org/schema/mvc"
       xmlns:context="http://www.spingframework.org/schema/context"   
       xsi:schemaLocation="http://www.springframework.org/schema/beans 
                           http://www.springframework.org/schema/beans/spring-beans.xsd 
                           http://www.springframework.org/schema/context 
                           http://www.springframework.org/schema/context/spring-context-4.3.xsd 
                           http://www.springframework.org/schema/mvc
                           http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd">
    <mvc:annotation-driven />
    <context:component-scan base-package="com.packt.webstore" />

 <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
    <property name="prefix" value="/WEB-INF/jsp/" />
    <property name="suffix" value=".jsp" />
    </bean>
</beans>

The maven dependencies in the project are:

spring-webmvc-4.3.3.RELEASE
spring-aop-4.3.3.RELEASE
spring-beans-4.3.3.RELEASE
spring-context-4.3.3.RELEASE
spring-core-4.3.3.RELEASE
commons-logging-1.2
spring-expression-4.3.3.RELEASE
spring-web-4.3.3.RELEASE
jstl-1.2
javax.servlet-api-3.1.0

I'm really stuck here. Please help me.

Guglio
  • 1
  • 1
    hey here [The matching wildcard is strict, but no declaration can be found for element 'context:component-scan](http://stackoverflow.com/questions/13589470/the-matching-wildcard-is-strict-but-no-declaration-can-be-found-for-element-co) – Plain_Dude_Sleeping_Alone Nov 16 '16 at 15:03

1 Answers1

0

I'm using the same version of spring like you and the same problem. After a long research, i found this:

Code Working

Sorry but for my little reputation i can't put the code in text. Best Regards.

gtavo
  • 1
  • Please **[edit]** your post and show the actual code as text instead of screenshots. Others can't copy and paste from your images. [See here](http://meta.stackoverflow.com/a/285557/1402846) for details. Please also read [this help center page](http://stackoverflow.com/editing-help) to learn how to format your code. Thank you. – Pang Nov 19 '16 at 06:10