Spring MVC learning resources - java

I have a J2EE site which is running fine, main functionalities include display contents from MySQL, form validating, etc.
I want to pass this site to Spring MVC framework in one or two weeks, but I know nothing about Spring MVC. I decide to use Spring MVC + Maven.
I'm searching for good learning resources to let me do this. It should be easy to learn and project-based. I've read some of the guides from Spring website, it's good but too slow. I just want learn to build the same site with Spring and that's it.
Thanks.

You can find a lot of documentations, materials and examples by searching on Google and GitHub. You can also check http://spring.io, which contains excellent guides and examples.
Keep in mind Spring is a very large framework...you won't be able to learn everything about it by learning one or two tutorials.

http://courses.caveofprogramming.com/ - you can try send an email and get the rest of his video tutorials. they are very good
https://www.youtube.com/watch?v=mH2jx2RCu7o&list=PLmcxdcWPhFqMq2BctGktOcIJKUw23wJeh
http://docs.spring.io/spring/docs/current/spring-framework-reference/pdf/spring-framework-reference.pdf

If you are looking for paid resources then you should go with
Spring & Hibernate for Beginners (includes Spring Boot) 5*
Spring Boot Microservices with Spring Cloud Beginner to Guru 4*
Learn Spring Boot - Rapid Spring Application Development 4*
Learn Spring: The Certification Class
If you are looking for free resources then
https://www.youtube.com/c/JavaGuides 5*
https://www.youtube.com/c/LearnCodeWithDurgesh 4.5*
https://www.youtube.com/c/Telusko 4*
Tip: The best way to learn Spring Boot if you have prior exposure to Java and Spring Framework is to build a simple application.

Related

Learning Java WebServices purpose Spring Core and MVC and Hibernate must needed

i'm working as android and iOS developer i'm having 1.5 years experience
so i want to learn java web services for data storing in back end purpose.
for that must need to learn spring core , mvc and hibernate (one of my senior said) is it worth?
and what are the prerequisite and if i learn web services is it helpful for me
thanks in advance
the best way is to start from official tutorial of SPRING:
https://spring.io/guides/gs/rest-service/
and oracle documentation for jax-ws (soap)
http://docs.oracle.com/javaee/6/tutorial/doc/bnayl.html
and jax-rs (REST)
http://docs.oracle.com/javaee/6/tutorial/doc/giepu.html

Use Twirl with Spring MVC

Is it possible to use Twirl with Spring MVC as the view technology? I would like to use something in place of JSP, and Apache Tiles feels cumbersome to me. Twirl the view technology for the Play Framework looks very cool, and similar to ASP.NET Razor.
https://www.playframework.com/documentation/2.3.x/JavaTemplates
I did a quick Google search but did not uncover much.
I didn't used Play Framework so I'm not familiar with it's architecture. But I found your question interesting and did some research.
Twirl Template Engine with Spring MVC Demo App
But I did found some useful resources that might help your case.
Spring MVC Twirl GitHub
This repository has an identical example of what you're looking for.
To be honest, I haven't tried to run this code myself but it seems like a trustworthy user.
Also, I did found a Blog Example which explains how to run Twirl Template Engine standalone without Play Framework. This doesn't cover your use-case but it suggests it's possible to use Twirl Template Engine without Play Framework (hence with right configs it's possible to use it with Spring)
Standalone Twirl Template Engine Usage Example - Blog and GitHub Repo
Standalone Twirl Template Engine Usage
Standalone Twirl Template Engine Usage GitHub Repository
Different Template Engines for Spring - Does not mention Twril
Also, if you wan't a great reading reference I always visit Baeldung website
I found a blog post about different template engines for Spring. They don't cover your use case, but based on this article it is possible to use variety of different engines given that you have proper dependency (e.g. maven, gradle) and do a proper configuration.
Does not mention Twirl, but it might give you some idea how to do it
Template Engine for Spring Blog Post
If you are looking for a templating framework to use with Spring MVC I recommend using Spring's Thymeleaf.
This answer also provides some valuable feedback relating to the issue: HTML templates in spring boot similar to play framework
Spring framework does not force you to use any particular view
technology. You can use anything that can be integrated. The topic is
covered in the documentation
(https://docs.spring.io/spring/docs/current/spring-framework-reference/web.html#mvc-view)
where you can read about the details on popular choices. However, the
most popular is Thymeleaf, which used to be a part of Spring MVC
before separation into an independent project. You can find a clear
example on how to use it with Spring Boot in the getting started
guide.
The templates in Play framework created using Twirl framework are
converted into Scala code. You simply pass the data model via template
parameter list, just like you do with any method.
In Spring framework you put all date that you want to expose to your
view in a so-called model map, which is a simple key-value storage. In
the view technology you refer the values using corresponding keys.

Creating REST service using apache CXF in spring MVC

Hello guys I am new to Spring MVC and i want to create a REST web service using Apache CXF...I have seen many tutorials online but I am so much confused with the annotations and all..Is there a simple neat and clean tutorial to refer
thanks
If your application is already using Spring MVC, I wouldn't try to create a web service with CXF. Just use the REST-style annotations that Spring MVC provides, and you'll get most (probably all) the way there. And it will integrate with other parts of your webapp which are using Spring a little more tightly.
The best tutorials for Spring MVC (Beginners), i recommend http://www.vaannila.com/.
Another good one is http://www.javacodegeeks.com.
Just go through the links. Start from Hello World and keep doing practice.
Enjoy Coding.....
Well, it's all right to be confused at first. You say there are many tutorials and you need one of them. Tutorials are great, but I'd recommend to look for books, not just for short descriptions. If you are new to Spring, try "Spring in Action" or any other, that would give you a basic understanding of what's going on in the tutorials.

Java MVC Web development framework?

I want to develop a website with java but I'm absolute beginner in java web development.
I want to use a framework that uses the MVC pattern and Ajax.
I did some search and found that Spring or Struts are suitable but I'm not sure.
could you please recommend a framework?
Play Framework might be a good option because of its incredible simplicity.
I'd recommend Spring:
Developing a Spring Framework MVC application step-by-step
The Stripes Framework is also worth consideration and can be used along with Spring.
http://www.stripesframework.org
It's easy to use and easy to configure. Unlike Struts, which is fairly old hat these days.
There are a plethora of frameworks now and it's worth checking each one that will suit your needs. It's a personal thing and it's good that we're not all restricted to a few.
JRapid is very easy to use. You'll get a working application in minutes and it generates AJAX powered user interface.
I work with Spring Webflow - technology based on Spring MVC. Webflow is described in official help pretty well. Personally, it think Webflow is much more usable than bare Spring MVC, however there are always someone who disagrees.
Moreover Spring (not talking about MVC specifically) can be used outside of web projects, so it seems to me it is advantage of Spring.
Cannot say anything about Struts.
I would recommend GRAILS for fast rapid web application development, that includes scaffolding functionality and web page generation based on data models.
https://grails.org/learn
It is the fastest way for MVC developers.

About Java EE, Spring and Hibernate

Basically I want to learn this technology. I already know Java SE. My question is, what is a good start to learn Spring and Hibernate? Is the book Head First JSP and Servlets good or what?
My question is, where is the good start to learn Spring and Hibernate?
I'd recommend the Second of Edition of Spring in Action by Craig Wall (it covers both) and of course the Reference Documentation of Spring Framework.
Is the book Head First JSP and Servlets good or what?
It is. But not for the mentioned topics.
There are many topics under the Spring framework. The ones that I use most are - IOC, AOP, Transaction Management, and Spring JDBC. In order to grasp these concepts I used the spring website extensively and also read the Spring Recipes book. I coded the examples that were on the book and tried to convert an existing app in using the spring framework (like IOC and JDBC). The spring forum is very useful. An of course folks here at Stack Overflow are always willing to help.
I could recommend you Pro Spring 2.5 by Rob Harrop and Jan Machacek. It's quite easy to read and there are quite a lot of simple, but precise examples. And, of course, Spring has very good reference.
And if you want to know more about Hibernate, you should definetely take a look at Java Persistence with Hibernate. One of the author is Gavin King, creator of Hibernate, so while reading this book you're getting first hand knowledge.
The spring latest documentation is the good start for learning spring.
Since, spring has so many modules, you may initially get confused.
you can start spring core and can learn the rest of the modules as you go further.

Categories

Resources