Home >Backend Development >XML/RSS Tutorial >PlayFramework completely implements an APP (14)
Add test
applicationTest.java
@Testpublic void testAdminSecurity() {
Response response = GET("/admin");
assertStatus(302, response);
assertHeaderEquals("Location", "http:/ /localhost/login", response);
}
More test introductions
http://play-framework.herokuapp.com/zh/guide10
*In the previous introduction Encountered a problem that was not solved
Importing the crudsecure module, there was a compilation problem, and the project was not introduced
Solution:
The module to be imported is configured in dependencies.yml
require:
- play
- play -> crud
- play -> secure
Run the command
>play eclipsify
Re-import the project into eclipse to solve the problem
The above is the complete implementation of an APP by PlayFramework (ten 4). For more related content, please pay attention to the PHP Chinese website (www.php.cn)!
. .