Skip to content

A little project to play around with Liferay Portal and Spring Framework.

Notifications You must be signed in to change notification settings

naXa777/liferay-portlet-spring-mvc-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Liferay Portlet Spring MVC App

A little project to play around with Liferay Portal, Spring Framework, and MySQL.

Using:

  • Java 8
  • Maven 3
  • Spring Framework 4.3.5
    • Spring Core
    • Spring Transactions
    • Spring Data JPA
    • Spring Portlet MVC
  • Liferay 6.2
  • Project Lombok
  • Portlet 2.0
  • MySQL 5
  • JPA 2.1 + Hibernate (as JPA provider)
  • JSP + JSTL + Spring Form taglib
  • Mixed XML Schema-based and annotation based Spring configuration

Screenshot

Usage

$ git clone https://github.com/naXa777/liferay-portlet-spring-mvc-app.git
$ cd liferay-portlet-spring-mvc-app
$ mvn package

First-time configuration

  • Define Liferay properties in pom.xml
  • Create portal database:
CREATE DATABASE lportal
    CHARACTER SET utf8
    COLLATE utf8_general_ci;
  • Add database portal properties (portal-ext.properties file in $LIFERAY_HOME directory) with your MySQL credentials:
# MySQL
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=
jdbc.default.password=
  • Check connection:
    After Liferay Portal relaunch with the above settings you should have 180 new tables in lportal database.

Deploy

If you're using Liferay Portal with Tomcat, copy the war to the deploy directory and wait for Liferay to deploy it. After successful deploy you should be able to find the portlet under Sample category.

$ cp target/portlet-demo-1.0.war $LIFERAY_HOME/deploy/

or

$ mvn liferay:deploy

IntelliJ IDEA setup

Licence

Copyright 2017 Pavel Homal

Licenced under the WTFPL Licence: http://www.wtfpl.net/

About

A little project to play around with Liferay Portal and Spring Framework.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published