<beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:context="http://www.springframework.org/schema/context"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:mvc="http://www.springframework.org/schema/mvc"
  xsi:schemaLocation="
        http://www.springframework.org/schema/beans     
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/mvc
        http://www.springframework.org/schema/mvc/spring-mvc.xsd
        http://www.springframework.org/schema/context 
        http://www.springframework.org/schema/context/spring-context.xsd">

  <context:component-scan base-package="pl.koszela.jan.controller"/>

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

  <bean id="productDTO"
    class="pl.koszela.jan.persistence.dto.impl.DefaultProductDTO"
    scope="prototype">

  </bean>

  <bean id="specialPriceDTO"
    class="pl.koszela.jan.persistence.dto.impl.DefaultSpecialPriceDTO"
    scope="prototype">

  </bean>

  <mvc:resources mapping="/resources/**" location="/resources/styles/css/"
    />

  <mvc:annotation-driven />

</beans>
<beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:context="http://www.springframework.org/schema/context"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:mvc="http://www.springframework.org/schema/mvc"
  xsi:schemaLocation="
        http://www.springframework.org/schema/beans     
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/mvc
        http://www.springframework.org/schema/mvc/spring-mvc.xsd
        http://www.springframework.org/schema/context 
        http://www.springframework.org/schema/context/spring-context.xsd">

  <context:component-scan base-package="pl.koszela.jan"/>

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

  <bean id="productDTO"
    class="pl.koszela.jan.persistence.dto.impl.DefaultProductDTO"
    scope="prototype">

  </bean>

  <bean id="specialPriceDTO"
    class="pl.koszela.jan.persistence.dto.impl.DefaultSpecialPriceDTO"
    scope="prototype">

  </bean>

  <mvc:resources mapping="/resources/**" location="/resources/styles/css/"
    />

  <mvc:annotation-driven />

</beans>
Change scaning component into whole project
Change scaning component into whole project
