본문 바로가기
프로그래밍

[Eclipse] 이클립스 스프링에서 ajax 동작 안될 때

by 개발자신입 2024. 3. 22.
반응형

dispatcher-servlet.xml

ajax가 안될때

<mvc:annotation-driven/> 한 줄 추가

 

 

    <context:component-scan base-package="servlet">
        <context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
        <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Service"/>
        <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Repository"/>
    </context:component-scan>

    <bean class="org.springframework.web.servlet.view.UrlBasedViewResolver" p:order="1"
	    p:viewClass="org.springframework.web.servlet.view.JstlView"
	    p:prefix="/WEB-INF/jsp/" 
	    p:suffix=".jsp"/>
	    <mvc:annotation-driven/>
</beans>
반응형

댓글