Spring MVC with Intellij Full Java Config. No web.xml or Servlet.xml

Sazzad Islam · 40K views · 2016 · 6:31

Open on YouTube

Web developmentSoftware architecture & designtutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it when newcomers to Spring struggle with XML configuration or 404 errors and need a working Java-config project to copy.

Recommended by 2 people across 2 different months, 2016 to 2017.

What it is

A short screencast that builds a Spring Web MVC application in IntelliJ IDEA using only Java-based configuration, with no web.xml or servlet XML files. The presenter, Sazzad Islam, walks through the setup and links example code on GitHub.

What people said

Recommends LynAs · 2016-05 · Stack Overflow · on “spring bean could not autowire”

Since you are new in spring i suggest you to write full java config. That way you can debug your error more easily. Watch the following video to learn more Spring MVC with Intellij Full Java Config. No web.xml or Servlet.xml [this video] One more advice, Give capital later first to Class name & service/component name

Recommends LynAs · 2016-05 · Stack Overflow · on “Jsp issue in spring”

xml configuration is weird try to use java base config. Watch the following video for example [this video] AND problem with your app was web.xml <servlet> <servlet-name>spring</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>spring</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> <context-param> <param-name>contextConfigLocation</param-name> <param-value>WEB-INF/spring-servlet.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> I know its bad but you need to follow t

Recommends Jay Lin · 2016-12 · Stack Overflow · on “Setting up Intellij with Spring MVC framework”

I would suggest trying the offical spring website tutorial with one of these two Youtube videos: Official Spring website about Intellij: Serving Web Content with Spring MVC, Build with your IDE [LINK] Youtube video tutorials on setting up spring with Intellij: Spring MVC with Intellij Full Java Config. No web.xml or Servlet.xml [this video] or Spring MVC application with Intellij Idea (with xml config) [LINK]

Cites Arter Cadelanne · 2017-01 · Stack Overflow · on “Spring @RequestMapping, 404 error”

So, I'm trying to learn Spring Framework, but currently I'm stuck on this problem, for some reason my mappings don't work and when I try to access that address I'm getting a 404 error. Can someone please clarify what I'm doing wrong (both in usage of spring classes and the source of the problem I have described above)? I'm configuring spring using the example shown in this video: [this video] , the code is basically the same, the only difference is package name and the location of the JSP file (could this be the source of my problem?). The project was made in IntelliJ Idea and is attached to the following link (Google Drive): Project Link [LINK] As my servlet container I'm using Tomcat8 (tried bo