Play Framework fully implements an APP (1), frameworkapp

Source: Internet
Author: User

Play Framework fully implements an APP (1), frameworkapp

A blog engine projectYabe.

 

1. Create a project

>play new yabe 

Set Application Name:Yet Another Blog Engine.

 

2. Create an Eclipse configuration file

>play eclipsify yabe

Import Eclipse

 

3.modify index.html

#{extends 'main.html' /}#{set title:'Home' /}

  

4. Modify Application. java

public static void index() {    System.out.println("Yop");        render();}

Run the test to check whether the test is available.

 

5. Set database connection (PostgreSql is used in this example) and modifyApplication. conf

  db.driver=org.postgresql.Driver  db.url=jdbc:postgresql://localhost:5432/postgre  jpa.dialect=org.hibernate.dialect.PostgreSQLDialect  db.user=#####  db.pass=#####

Run the program and refresh the page. The following prompt appears on the console, indicating that the configuration is correct.

INFO ~ Connected to jdbc: postgresql: // localhost: 5432/postgres for default
INFO ~ Application 'Et Another Blog Engine 'is now started!

 

 

..

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.