Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You are trying to use <a href="http://static.springsource.org/spring/docs/3.1.x/javadoc-api/org/springframework/web/context/support/AnnotationConfigWebApplicationContext.html" rel="nofollow">AnnotationConfigWebApplicationContext</a> which is intended to be used with <a href="http://static.springsource.org/spring/docs/3.1.x/javadoc-api/org/springframework/context/annotation/Configuration.html" rel="nofollow">@Configuration</a> and not xml based config files. Try switching to <a href="http://static.springsource.org/spring/docs/3.1.x/javadoc-api/org/springframework/web/context/support/XmlWebApplicationContext.html" rel="nofollow">XmlWebApplicationContext</a> instead and set</p> <pre><code>&lt;context-param&gt; &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt; &lt;param-value&gt;classpath:applicationContext.xml&lt;/param-value&gt; &lt;/context-param&gt; </code></pre> <p>If you are using Java-based configuration annotated with <code>@Configuration</code> then you can use <a href="http://static.springsource.org/spring/docs/3.1.x/javadoc-api/org/springframework/context/annotation/ImportResource.html" rel="nofollow">@ImportResource</a> to import your xml config.</p> <p><strong>UPD:</strong> Set your web.xml to</p> <pre><code>&lt;web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"&gt; &lt;!-- The definition of the Root Spring Container shared by all Servlets and Filters --&gt; &lt;context-param&gt; &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt; &lt;param-value&gt;/WEB-INF/applicationContext.xml&lt;/param-value&gt; &lt;/context-param&gt; &lt;!-- Creates the Spring Container shared by all Servlets and Filters --&gt; &lt;listener&gt; &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt; &lt;/listener&gt; &lt;!-- Processes application requests --&gt; &lt;servlet&gt; &lt;servlet-name&gt;RESTServlet&lt;/servlet-name&gt; &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt; &lt;init-param&gt; &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt; &lt;param-value&gt;/WEB-INF/applicationContext.xml&lt;/param-value&gt; &lt;/init-param&gt; &lt;load-on-startup&gt;1&lt;/load-on-startup&gt; &lt;async-supported&gt;true&lt;/async-supported&gt; &lt;/servlet&gt; &lt;servlet-mapping&gt; &lt;servlet-name&gt;RESTServlet&lt;/servlet-name&gt; &lt;url-pattern&gt;/api/*&lt;/url-pattern&gt; &lt;/servlet-mapping&gt; &lt;/web-app&gt; </code></pre> <p>See example web.xml here on GitHub - <a href="https://github.com/SpringSource/spring-mvc-showcase/blob/master/src/main/webapp/WEB-INF/web.xml" rel="nofollow">SpringSource / spring-mvc-showcase</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload