Deployment of the JEESZ distributed framework development environment and the jeesz framework

Source: Internet
Author: User

Deployment of the JEESZ distributed framework development environment and the jeesz framework
1. Prepare the environment

1. Development Tool: Eclipse IDE (a higher version is recommended)

2. JDK version: JDK1.7

3. Project Management: Maven3.1.1

2. Installation Steps

1. Install jdk1.7 and configure the environment variables (I believe everyone will do it. I will not repeat it here)

2. install maven: maven installation process is the decompression process (I have helped you unzip, directory: E: \ myprj \ jeesz-maven \ apache-maven-3.1.1), in order to facilitate everyone, related installation packages are provided here and will be shared under the packaged directory.

3. mavan configures the environment variables, right-click my computer, select Properties> advanced system Settings> environment variable> Find (system variable path), enter the path of your maven installation package at the beginning, and declare: because the specified directory is decompressed in the previous step, the configuration is as follows:

E: \ myprj \ jeesz-maven \ apache-maven-3.1.1 \ bin;

I believe everyone has been equipped with environment variables. If you are not very clear, please query the relevant information and learn about maven.

4. Open cmd and click mvn-version. The following result indicates that your maven installation is successful.

Mvn is a maven command. mvn-version is used to view the version information. my operating system is 64-bit WIN7, and the installed maven is 3.1.1. If the above information can be printed, it indicates that Maven3 has been installed on your computer.

5. Create a workspace (select the j2ee view after entering)

6. Configure Eclipse Encoding As UTF-8

In the Eclipse toolbar, select Window, Prefrences, General, and Workspace.

7. Configure the jre environment (You have to install jdk 1.7 before, and use the installed jdk for configuration here ):

Select Window à Prefrences à Java à Installed JREs à Edit à select your local jdk installation path à Finished à OK

8. remove information such as JavaScript verification (because the project uses a large number of files in different formats such as js, css, xml, and so on. Considering the execution time of each compilation, some verification information is temporarily removed here)

Window à Prefrences à Validation à Suspend all validators à OK

9. modify the maven settings. xml configuration file, path: E: \ myprj \ jeesz-maven \ apache-maven-3.1.1 \ conf, add local library address: <localRepository> E:/myprj/jeesz-maven/apache-maven-3.1.1/repository

</LocalRepository>

Modify the central library path (if the network is normal, you can download the missing jar package from the remote Central Library. I use the Central Library of Oschina here. If there is a problem with the network, you can use your own private server to load relevant jar packages, put all in the following directory:

E:/myprj/jeesz-maven/apache-maven-3.1.1/repository

10. Configure the maven installation directory and the local library directory loaded by the Setting file in Eclipse

11. Import Maven Project

File à Import à Existing Maven Projects à next step

Select your local maven project (select the jeesz-project root directory) and click OK:

After loading all the projects, click finish.

Reminder: This import process takes some time. Because I am locally connected to the network, I will download all the jar packages required by the project from the remote central database. Please wait.

If you use a local database, you do not need to wait for a long time. If you are using a private server, the waiting time will not be long.

Imported Project information:

The package of the local library has been downloaded:

12. Download all jar packages and update the maven project:

1) select all projects. 2) Right-click maven, select Update project... Select All. Select Association items. Click OK.

If the project still has a red X error, it must be a lack of relevant jar packages. You can use:

Window à showView à problem Window to view exception information:

If the jar package is missing, copy the provided jar package directly to your specified directory.

Perform the next step only after all errors in the project are cleared, as shown in)

Select all projects and clear the projects: Project à clean

13. Compile and package the project to check whether the problem exists:

Note: We usually package and compile the program for the root project because all dependencies are configured. Right-click jeesz-project à Run As à Maven build...

In the displayed dialog box, enter the clean install-X command, and check Skip tests, Run...

Reminder: if you are not familiar with maven commands, you can check relevant information.

Here is a simple explanation: "clean install-X" indicates to clear all projects and package the jar files to the local database, -X indicates the output information. (generally, you can use-X to locate the problem when a maven problem occurs .)

At this time, the console starts to compile and load all the packages. This process is a long one. Please wait patiently.

The following results indicate that the project is normal.

The prepared package (including war and jar) is in the target folder. Here, we only use jeesz-web-admin as the example:

 

14. Use Tomcat to publish the jeesz project (the release process is not described in detail, and everyone will do it ):

The following describes different projects:

Jeesz-web-admin: can be deployed independently (background management platform)

Jeesz-web-service: it can be deployed independently (the REST service platform allows you to expand the Rest service based on your own business, and related instances have been written in it)

Jeesz-service-bookmark and jeesz-service-task are dubbo service providers (this section only introduces dubbo service project development through favorites and to-do projects, customers can expand dubbo services based on their own businesses, which can be deployed at the same time or separately)

Jeesz-web-bookmark and jeesz-web-task are dubbo consumer platforms. The dubbo service interfaces exposed externally are as follows: jeesz-facade-bookmark and jeesz-fa çade-task (This section describes how the dubbo client calls the dubbo service provider through favorites and to-do projects, the customer can implant dubbo consumption end into different projects, just do some simple configuration)

Deployment conditions:

1) execute the MySQL database Script: jeesz. SQL

For configuration items of database jdbc, refer

2) Jeesz-web-admin can be deployed directly through tomcat

Login username and password: jeesz/admin

3) Jeesz-web-service: it can be deployed independently through tomcat.

Login username and password: jeesz/admin

4) deployment of dubbo-related projects requires the following conditions:

Install the dubbo control platform, decompress the war package to tomcat, replace the directory with the root directory, and start tomcat directly (the development environment provides window)

Zookeeper Registration Center installation, I provide a zookeeper-3.4.5 version (development environment provides Windows), enter the installation directory to start

Reminder: I have provided related programs. The dubbo control platform must be deployed on the Tomcat server independently. If you do not need to configure high availability, you can directly start tomcat. The Zookeeper Registration Center has related commands that can be directly run and started. If you want to deploy it on a Linux system, you can refer to the relevant documents we provide.

5) when the dubbo console and Registration Center start OK, deploy the Jeesz-service-bookmark and jeesz-service-task projects (which can be deployed independently) to tomat and serve as the dubbo service provider.

6) log on to the dubbo console to view the relevant service information. You can see that your published service has been controlled by the console:

Http: // localhost: 8080

The reason why the package name can be accessed directly through the address is changed to Root

Username and password: root/root

7) Deploy the Jeesz-web-bookmark and jeesz-web-task dubbo consumer projects in different parts to let developers know how services are called.

The installation process of the entire project is here first. After installing the project, developers are invited to invest in development. All services are directly servitized, because the project is developed based on drivers, therefore, design your table and use the gen code generation module of the jeesz-web-admin project to automatically generate all controller, service, dao, xml, and jsp interfaces, directly write and process the business. Documents will be continuously improved in the near future. Please pay attention to them all the time.

For more details, click the Source Code address to obtain: mingli

If you are interested, you can go to the ball ~ Sharing learning technologies: 2042849237

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.