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.
- Download Play-1.2.7.zip file.
- Unzip to the/dev/play-1.2.7 directory (example).
- 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