Configuration and use of the play 1.x framework

Source: Internet
Author: User

Seeing someone on the internet is recommending the use of the play framework, it is said that the advantage is fast development, similar to ROR. Then do an experiment to record the actual situation.

    1. Download Play-1.2.7.zip file.
    2. Unzip to the/dev/play-1.2.7 directory (example).
    3. Configuring play in Path
sudo vi ~/.bash_profile  # play!framework config  export PATH=$PATH:/dev/play-1.2.7  

Make configuration effective

source ~/.bash_profile

View the play configuration situation

play

The description of the play frame is displayed for the configuration to take effect.
4. Create an app booking
Shell Code

cd ~/workspace  play new booking

Play New ProductName can create an app, the resulting directory folder has apps, Conf, Lib, public, test, the role of these folders do not explain, see the name should know its purpose.
5. Running the booking application

play

Enter the address bar of the Brower: localhost:9000, enter the booking application.
6. Create the idea Project profile for the booking app

play idealize

After this command executes, the BOOKING.IPR file is generated in the app directory, and idea opens the file to open the booking app.
7. Applied Configuration Files
The main portal configuration file is the/conf/routes file
XML code
Get/application.index
The route here means: "/" is mapped to the index () of the application class under Contrlloers.
8.
Finally recommend a public number to everyone, this public number is mainly push technology and humanities articles, the pursuit of high-quality and original.

Configuration and use of the play 1.x framework

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.