Home  >  Article  >  Backend Development  >  PlayFramework completely implements an APP (14)

PlayFramework completely implements an APP (14)

黄舟
黄舟Original
2016-12-23 16:55:121782browse

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)!

. .


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn