• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

spring mvc and springboot mvc

 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I used Spring MVC before and I know usually I creat a web.xml defining "DispatchServlet", and in my  "myapp-servlet.xml" I define the controllers and view resolvers, etc.  However when I was learning sprintboot, it can alsodo MVC work using "ModelAndView" in its @Controller class, but it seems it doesn't require me to explicitly create "DispatchServlet" or even a web.xml file, nor do i need to create a "myapp-servlet.xml" file.  Is it true and why ? I suppose they are both using Spring MVC..
 
Bartender
Posts: 2438
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In our recent versions of Spring Framework or Spring Boot, web.xml and myapp-servlet.xml are optional.
You can use annotations like @Controller , @Component and etc to define beans.
Spring boot can autoconfigure data source. dispatcher servlet and some other resources for you to
save you some development time.
 
I miss the old days when I would think up a sinister scheme for world domination and you would show a little emotional support. So just look at this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic