PlayFramework completely implements an APP (14)

黄舟
Release: 2016-12-23 16:55:12
Original
1757 people have browsed it

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 (m.sbmmt.com)!

. .


Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!