Can a simple JSp and servlet code be migrated to Spring framework?

我的未来我决定 提交于 2019-12-08 02:23:57

问题


I am a newbie in web development. I'm using servlets and JSP for web development.However, I've learnt lately that Spring Framework is apt for that which incorporate servlets, jsp etc. So, my question is that can I now run my program using Spring framework ? Like, I have 2 jsp codes, and 1 servlet class. So, how can I migrate the code in Spring Framework ? what additional things or codes do I need to maintain ?


回答1:


Migrating an existing J2EE project is easy. You will get rid of a lot of "boilerplate" code in the process. The easiest way to do it in my opinion will be to use SpringToolSuite. Import your project in STS and then add "Maven" nature to it. In the pom configuration you can edit all the jars that you need and mention the spring framework. Once all this is setup it will be just a matter of minutes to change the code if it is small.

You can follow these video tutorials about maven and spring to learn about it. JavaBrains

There are more tutorials by "New Circle training" on youtube for the same.

I would also recommend you to read Spring in action 3rd edition-Manning

This book is a must and the best way to learn spring framework. Hope this helps



来源:https://stackoverflow.com/questions/22534396/can-a-simple-jsp-and-servlet-code-be-migrated-to-spring-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!