thinkphp Framework Development Fast Three site development environment deployment run debugging

Source: Internet
Author: User

Environmental requirements

1, fast speed three web site development (Q2222168869) download

2, thinkphp framework development around the fast three play download

3. Apache Maven 3.3+ Download

4. MySql 5.7+ Download

Import to eclipse

1, check out JeeSite4 source code:

2. Copy the Web folder to your working directory (the directory without Chinese and white space) and rename it to your project name, such as: Jeesite-demo

3, open the Pom.xml file, modify the 13th line, Artifactid for your project name, such as:<artifactid>jeesite-demo</artifactid>

4. Import to Eclipse, menu File, import, then select Maven--Existing maven Projects, click the next> button, select the Jeesite-demo folder for step 2nd, then click Fini SH button to import successfully

5, at this time, eclipse will automatically load maven dependency package, the initial load will be slow (according to their own network conditions), if the project has a small fork, please open the problems window, see the specific error content until there is no error

6, the download process you can prepare the database environment

Initializing the database

1, take MySQL as an example, it is best to configure the next SQL mode, or the table may be a problem when you build

Set session sql_mode= ' Only_full_group_by,strict_trans_tables,error_for_division_by_zero,no_auto_create_user,no_ Engine_substitution ';
2. Create user and authorization

Create user ' jeesite ' @ '% ' identified by ' jeesite ';
Create database Jeesite DEFAULT CHARSET UTF8 COLLATE utf8_general_ci;
Grant all privileges the jeesite.* to ' jeesite ' @ '% ' identified by ' jeesite ';
Flush privileges;
3. Open file/src/main/resources/config/jeesite.yml Configure the JDBC connection

Jdbc:

Mysql Database Configuration

Type:mysql
Driver:com.mysql.jdbc.Driver
url:jdbc:mysql://127.0.0.1:3306/jeesite4?usessl=true&useunicode=true&characterencoding=utf-8& Zerodatetimebehavior=converttonull
Username:jeesite
Password:jeesite
Testsql:select 1
4. If the project you have just imported to eclipse has finished loading jar and there is no error, you can execute/bin/init-data.bat script initialization database, first execution if meet table xxx doesn ' t exist error message, ignore can.

5. If the execution bat is unsuccessful, You can also find Com.jeesite.test.InitCoreData.java and Com.jeesite.test.InitGenData.java two files directly in Eclipse and open them, then right click on the Run as- > JUnit Test Runs unit tests to initialize database scripts.

Start the Tomcat service

1, is currently the spring Boot project, the internal integration of the Web container, you do not have to download tomcat for deployment, just follow the following way.

2. Open the/src/main/resources/config/application.yml file, configure your service port ports, deployment path Context-path, for example:

Server

port:8080
Context-path:/jeesite
Tomcat:
Uri-encoding:utf-8
3. Find the Com.jeesite.modules.config.Application.java file in Eclipse and open it, then right-click on Debug AS--Java application to start the service in the blank space.

4, note the use of debug run, to help you debug programs and improve development efficiency, such as: Modify the code inside the method, modify the View code, modify the mapper code, is not required to restart the Web service. If you change the structure of the Java class, if you add or delete attributes, methods, parameters, and so on, it is necessary to restart the service.

thinkphp Framework Development Fast Three site development environment deployment run debugging

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.