Javaポータルは、コンテンツ管理システム(CMS)に似ていますが、企業部門向けの、かなり複雑でモジュール式の情報システムを開発できるようにする特別なクラスのWebアプリケーションです。これは、通常、ページ、アプリケーション、ユーザー、プロセスの階層を操作する機能があり、国際化をサポートし、企業情報インフラストラクチャに統合する手段があることを意味します。
これらのシステムの市場には、Oracle、SAP、IBM(現在はHCL Technologies Ltd)、Red Hat JBossなどの有名企業の商用製品があり、さらに、まともなオープンソースバージョンのLiferayポータル、教育およびその他のトピック指向のポータルシステムもあります。 、ポータルは完全ではありませんが、DMSAlfrescoなどのポータルテクノロジーをサポートする情報システムがあります。支持とは、理論的にはあるシステム用に開発されたアプリケーションを別のシステムにインストールできることを意味しますが、実際にはこれが完全に当てはまるわけではありません。メーカーは他と互換性のない独自の機能を追加したため、この比類のない機能は実現されませんでした。
. , , .. . . Portlet 3.0 .
“”, . .
java . Portlets 1.0 , Portlets 2.0, Portlets 3.0.
, - - ;). npm spring-boot . .. SPA , “ ” . , . : JSON , , , xml-, .
, - -. .. java , Spring, Struts, Faces, Jersey . PHP Ruby.
WSRP .
. 4- . .
Java , “” .
Apache Pluto, , .. .
.
Unix-like Windows git shell . git cmd.exe
git clone https://github.com/apache/portals-pluto
. , - , 8 ant. .
mvn package
ant -f dist-build.xml -DpackageOnly=true
-DincludeDemos=true , - , demo/pom.xml build
<finalName>${project.name}</finalName>
Windows pom.xml,.. -
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
target/dist , . , .. .
pluto-3.1.1-SNAPSHOT-bundle.tar.bz2
.
, :\projects
cd c:\projects
tar xvjf c:\portals-pluto\pluto-3.1.1-SNAPSHOT-bundle.tar.bz2
cd pluto-3.1.1-SNAPSHOT
bin\startup.bat
startup.sh .
, .
, :
tail logs\catalina-.out -f
Windows .
org.apache.catalina.startup.Catalina.start Server startup
, ,
- pluto .
.
, , Apache Pluto , , , , Liferay WebSphere/HCL DXP.
Pluto Admin, .
http://localhost:8080/pluto/portal/Pluto%20Admin
demo, , .war webapps/.
. maven, . windows M2_HOME M2_HOME\bin Path.
cd projects
mvn archetype:generate -DarchetypeGroupId=org.apache.portals.pluto.archetype -DarchetypeArtifactId=mvcbean-jsp-portlet-archetype -DarchetypeVersion=3.1.0 -DgroupId=com.mycompany -DartifactId=hello-portlet
- Enter.
pom.xml .
<finalName>${project.name}</finalName>
.
, .. pluto .
cd hello-portlet
mvn -Ppluto package
, , . .. “” .
pluto liferay-cdi liferay-spring, Liferay . .. .. , .
target/’ Java- .war .
.war webapps.
- .
.
, Firefox, Chrome. - , , , .war webapps/ . , , .
, , , , , . VIEW render , EDIT, HELP . “ ” == “ ”. .. . . ( ) , , , .
hello-portlet/ maven IntelliJ IDEA. , gradle , .. . maven.
, MVC .
, .. , portletName portletNames. , Portlet .
:
@Inject - -
@RenderMethod -
@ActionMethod - GET, POST “ ”
@ServeResourceMethod - JSON
- actionName, id.
WAR , ..
src/main/webapp/resources
@RenderMethod(portletNames = "HelloPortlet", include = "/WEB-INF/jsp/helloView.jsp")
<portlet:actionURL var="placeOrderURL" name="placeOrder"></portlet:actionURL>
<portlet:resourceURL var="getSettingsURL" id="getSettings"></portlet:resourceURL>
rest .
request.setAttribute JSTL (.. ) JSP
<%
String ctxPath = request.getContextPath();
List<String> settings = (List<String>) renderRequest.getAttribute("settings");
%>
, . , . .
, <portlet:namespace> contextPath .. id , , , .
, . React, Angular, Vue . -, .. . skinny-widgets (https://www.npmjs.com/package/skinny-widgets) - .
GET public render parameters
@PortletConfiguration(portletName="portlet1", publicParams = {"categoryId"},
… { }
)
POST , .
RenderURL renderURL = resp.createRenderURL();
MutableRenderParameters renderParams = renderURL.getRenderParameters();
String idString = renderParams.getValue(name);
Liferay ( ) , .
multipart
Part part = request.getPart("image");
“ ” , . , @PortletConfiguration, .
, PortletPreferences, .. . Apache Pluto , Liferay .
@PortletConfiguration portlet.xml, .
“ ”, demo/ . “ ?”, “ ?”.
, .. , , weld, jandex 1.2.2.Final lib/ .
, . , , .
- : http://bitbucket.org/finistmart
JAX-RS - MySQL c Postgres.
: ;) .
, .
Pluto Liferay ( i7 2 U 8 Gb RAM , liferay, , ;) .
Liferay, , sourceforge.net
Liferayのでは、ポートレットの料理人がにアップロードされている展開/へ、およびサーバ料理のtomcat-XYZ / webappsにとで快適な発展のためにportlet-ext.properties無効のさまざまなキャッシュこと(Googleで検索することができます)パラメータを追加する必要があります。少し調整した後、それは開発にも良いオプションになる可能性があります。