Liferay repo for basic tutorials and hands on.
This project is an example of creating Spring MVC Controller setup using simple Hibernate JPA implementation for connecting to the database.
#####################################################################################
This project is an example of creating Spring MVC Controller setup using simple spring JDBC template for connecting to the database.
#####################################################################################
This project is an example of creating multiple Spring MVC Controller setup in a single plugin project. Important thing to note is that you need to follow project structure in exact same way as created above. Following are some basic thumb rules provided :-
To Add additional spring mvc portlet in single plugin
-
Add new controller. Make sure you choose new java package
-
Add portlet jsp. Make sure you add inside new folder
-
Add portlet specific application context file. In this file, you need to set parent path of JSP to viewResolver bean.
-
Update Liferay specific configuration files portlet.xml Add new portlet entry (with correct portlet name) Make sure you give correct path of portlet specific application context file (that you created in #3 above) in init param liferay-portlet.xml Add new portlet entry (with correct portlet name) liferay-display.xml Add new portlet entry with id as it’s name defined in portlet.xml
-
It’s always good idea to split your work in multiple spring controller instead just put all your methods in one big controller. In this scenario, you no need to create new Maven Spring MVC Portlet. Just add additional controllers in same package.
And this is done. Express your thoughts in comment section to make this topic more interesting.
Spring MVC is one of the most popular framework to create portlet in liferay. Spring MVC portlet will have multiple controllers. mapping of controller and JSP is defined in application context file. Path of application context file is configured in portlet.xml file. To add new portlet, you need to create separate controller package, jsp folder, application context path and have to made separate portlet entry in portlet.xml, liferay-portlet.xml and liferay-display.xml files.
http://www.opensource-techblog.com/2017/08/maven-spring-mvc-portlet.html
#####################################################################################
This project is built purely on liferay and build by gradle.
#####################################################################################
This project is built purely on SpringMVC model and build by maven. This module showcases the use of different resources of a controller. For example :- @RenderMapping , @ActionMapping , @ResourceMapping It also shows examples of how to use Ajax/Jquery for sending data back n forth.
#####################################################################################
This is a plain java based util project to be used by all liferay projects for connecting to databases. Other common utilities can also be implemented in here.
#####################################################################################
This project is being used in combination with # MySpringMVCPlugin. It shows an example of InterPorletCommunication (IPC).
#####################################################################################