Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring MVC (xml config nightmare?) vs spring roo?

I am just delving into the spring mvc (or spring roo), from what i have read it appears that spring MVC can be a nightmare to configure. I have to configure XML files, is this the web.xml file??? Or something different?

Is it still a nightmare or has it been improved?

Is there no editor for these XML files? I am using eclipse IDE

Spring roo apparently does spring mvc without XML config worries.

I would love anyone to explain the differences..

Thanks in advance

like image 240
Martin Avatar asked Feb 22 '23 14:02

Martin


1 Answers

First Spring MVC is not a nightmare to configure, you just have to know what you are doing.

For that I would suggest you to download Spring IDE, which have a lot of XML editors that make you life easier if you are not experienced with Spring XMLs.

Basicly you have to configure 2 things

  • Web.xml ( this one is not because of spring it's Java EE, but you need to include some spring MVC configs in it )
  • applicationContext.xml( this is where you define what you want from Spring )
  • servlet-context.xml ( this is also from spring MVC and have some servlet definitions as well as some routing ones)

one you get to know them you will find it easy to configure and very flexible.

One thing to notice Spring and Spring MVC are different things, I advise you to learn both of them.

Also Spring Roo is a code generator, for Cruds, simple things and setup projects it's great but if you need to build a reasonable big app that will need support it's always easier to create everything youself because it's easier to support when you know the code, so use it with care.

like image 149
Cristiano Fontes Avatar answered Feb 25 '23 03:02

Cristiano Fontes