簡體   English   中英

集成Play framework 2.0和Spring框架

[英]Integrating Play framework 2.0 and Spring framework

我開發了一個Spring / JPA應用程序: 服務,存儲庫和域層即將完成

唯一缺少的是Web圖層 我正在考慮將Playframework 2.0用於Web層,但我不確定是否可以在Playframework 2.0類中注入/使用spring bean

這可能嗎? 如果是這樣的話?

您可以。 已針對Play 2.5.x進行了更新:

https://github.com/remithieblin/play-spring-loader

Alex.p是正確的,PlayFramework中支持spring

看看這里: http//typesafe.com/blog/announcing-play-framework-21-the-high-velocit

在這里的例子: https//github.com/guillaumebort/play20-spring-demo

干杯

我剛剛在我的項目上測試它,但是在2.0中的playframework 2.1上它沒有用。

這是使用Spring注入bean的另一種方法。 使用標准注釋。 不需要插件。

https://github.com/huntc/play-spring

在Play中已經支持 Spring IoC容器。 只需編輯鏈接到文章中提到的application.conf文件即可。

忽略上面看到的評論:似乎這在playframework 2.0中被刪除了。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM