Click here to Skip to main content
15,888,286 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have tried dependency injection example from here https://dzone.com/articles/guicing-play-framework


What is missing here?

What I have tried:

public class TestController extends Controller{
@Inject
private Testing test;

public Result result() {
    test.tt();
    return ok();
} 
}



Service Interface code:

public interface Testing {

public String tt();
}



ServiceImpl code:

public class Testingimpl implements Testing{
@Override
public String tt() {
    return "test";
}
}
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900