Playframework(15)Update the Version to 2.3.8 Going with Java

Playframework(15)Update the Version to 2.3.8 Going with Java
 
Download the latest version, unzip that and do what ever I do in the past
If I create one new project based on scala
> activator new easyplay play-scala
 
To run "easyplay" from the command line, "cd easyplay" then:
/Users/carl/work/play/easyplay/activator run

To run the test for "easyplay" from the command line, "cd easyplay" then:
/Users/carl/work/play/easyplay/activator test

To run the Activator UI for "easyplay" from the command line, "cd easyplay" then:
/Users/carl/work/play/easyplay/activator ui
 
Check the Installation
> activator -help
 
try java project
> activator new easyplayjava play-java
 
It seems that there is some changes based on the new version. I will try to read the doc again.
Check Java Version
> java -version
java version "1.8.0_25"
 
> javac -version
javac 1.8.0_25
 
Activator Tool
It provides SBT and many templates.
Check the installation
> activator -help
 
Command to start the activator
> activator ui -Dhttp.address=0.0.0.0 -Dhttp.port=8888
 
Create a new Java Project
> activator new easyplayjava play-java
all the things are based on sbt. I am familiar with that.
 
This command will enter the console
> activator
 
activator, sbt, similar.
 
JAVA8, RESTful Playframework 2.x, Mysql Example  https://github.com/luohuazju/sillycat-playrest
 
Java API and Introduction
http://sillycat.iteye.com/blog/1750340 HTTP, router, cookie, session, flash
http://sillycat.iteye.com/blog/1750947 Promise<Result>, html Template
http://sillycat.iteye.com/blog/1751649 Form- spring data binder, @BodyParser.Of(Json.class)- handler response
 
Asynchronous
avoid blocking operation in controller, such as JDBC calls, steaming API, long computation.
 
Promise for client, another Promise to get the result.
 
promise() helper
Promise.promise(()->intensiveComputation());
Use thread to handle that.
 
Java AKKA
Play contains a default AKKA system.
 
Have AKKA system in controller, convert Future to Promise to return.
 
Deploy Option Configuration
> activator stage
> bin/easyplayjava -Dconfig.file=conf/application.conf -Dhttp.port=8888 -Dhttp.address=0.0.0.0
 
References:
Installation
 
deployment
 
new doc
 
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值