• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Spring MVC configuration files

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!! how are you guys?

I have been working with Spring MVC framework and it is really helpful, but now I have a question, as you know Spring MVC framework create by default the xml configuration files and I would like to know if the is a way to create automatic java based configuration file instead of xml.

I will be waiting for your help!!
 
Ranch Hand
Posts: 1744
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I found you a simple example of replace web.xml by a Java class. The class extends AbstractAnnotationConfigDispatcherServletInitializer. In this class, you can specify the servlet config and root config.
https://www.mkyong.com/spring-mvc/gradle-spring-4-mvc-hello-world-example-annotation/

Another example is here:
https://www.boraji.com/spring-4-mvc-hello-world-example
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!