play framework 相关
1.下载
官网下载解压,安装有jkd即可使用
2.helloworld
$ activator new my-first-app play-java
https://www.playframework.com/documentation/2.4.x/NewApplication
3.项目结构
https://www.playframework.com/documentation/2.4.x/Anatomy
4.使用
4.1日志
在conf/ 路径下增加logback配置文件 logger.xml即可
http://blog.csdn.net/i6448038/article/details/42413263
4.2引入依赖
在build.sbt文件中引入项目依赖包
libraryDependencies ++= Seq( javaWs, cache, filters, "redis.clients" % "jedis" % "2.6.0", "com.alibaba" % "fastjson" % "1.2.4" )
4.3访问路由配置routes文件
Get /path/path/v1 package.class.method
4.4使用play自带缓存Ehcache
libraryDependencies ++= Seq(
cache,
...
)
https://www.playframework.com/documentation/2.4.x/JavaCache
4.5访问ws service
libraryDependencies ++= Seq(
javaWs
)
https://www.playframework.com/documentation/2.4.x/JavaWS
4.6
==========================================================
踏踏实实做事,健健康康生活=========================================================