GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - devxzero/play-java-spring: Play Framework with Spring dependency injection

BranchesTags
Open more actions menu

Latest commit

 

History

3 Commits
3 Commits

Folders and files

NameName
Last commit message
Last commit date
app
app
 
 
conf
conf
 
 
project
project
 
 
public
public
 
 
test
test
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
build.sbt
build.sbt
 
 

Repository files navigation

Default play-java template with Spring

Specs

  • Play Framework 2.4.2
  • Play Java Seed 2.4.2 (activator template)
  • Spring Framework 4.2.0.RELEASE
  • Spring-Guice integration 1.0.0.BUILD-SNAPSHOT

Introduction

Getting Play Framework < 2.4 to work with Spring Framework, was relative easy: https://www.playframework.com/documentation/2.3.x/JavaInjection.

In Play Framework 2.4, they added "dependency injection support":

Out of the box, Play provides dependency injection support based on JSR 330. The default JSR 330 implementation that comes with Play is Guice, but other JSR 330 implementations can be plugged in.

But getting Play 2.4 to work with for example Spring dependency injection is hard to accomplish, especially compared to 2.3, where you could get it to work with just a few lines of code. So instead of making it easier, they made it a lot harder, and basically forced the use Google Guice as depedency injection container, which is also used internally by Play since 2.4.

But thanks to the Spring-Guice snapshot project, we don't have to learn and write the complex Spring and Guice internals.

Notes

  • Another Play 2.4 solution can be found at https://github.com/zarinfam/play24-guice-spring, which has the Spring-Guice project code embedded and modified to refer to a Spring configuration class.
  • https://github.com/jroper/play-spring (for Play 2.4) doesn't seem to work.
  • https://github.com/jamesward/play-spring (for Play 2.4) doesn't seem to work.
  • Limitations: those described at https://github.com/spring-projects/spring-guice.

About

Play Framework with Spring dependency injection

Resources

Readme
License
Activity

Stars

9 stars

Watchers

3 watching

Forks

3 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.