You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by mi...@apache.org on 2018/10/23 06:04:16 UTC
[incubator-dubbo-ops] branch develop updated: update README
This is an automated email from the ASF dual-hosted git repository.
min pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo-ops.git
The following commit(s) were added to refs/heads/develop by this push:
new 1c0b908 update README
1c0b908 is described below
commit 1c0b908ce16588eca89a262b4ef2f26f58191c2f
Author: nzomkxia <z8...@gmail.com>
AuthorDate: Tue Oct 23 14:04:05 2018 +0800
update README
---
README.md | 56 ++++++++++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 48 insertions(+), 8 deletions(-)
diff --git a/README.md b/README.md
index 1b08e2e..289eb6f 100644
--- a/README.md
+++ b/README.md
@@ -15,23 +15,63 @@
### Backend
-> Configuration files (Before packaging application, make sure the correct profile in the MAVEN profiles was selected)
->
+* Configuration files
+
> - `application.properties`
-> The generic configuration, it's permanent.
+> The generic configuration, shared by `application-develop.properties` and `application-production.properties`
+> - `application-production.properties` (default)
+> The configuration for production
> - `application-develop.properties`
-> The configuration for develop, it will be work when you use Maven's `develop` Profile.
-> - `application-production.properties` (default)
-> The configuration for production, it will be work when you use Maven's `production` Profile. Meanwhile, it's maven's default profile in this project.
+> The configuration for develop
+>
+
-### Build setup
+### Production Setup
1. Clone source code on develop branch
2. Specify registry address in `dubbo-admin-backend/src/resources/application-production.properties`
-3. Build `mvn clean package`
+3. Build
+
+ * select configuration files via command line
+
+ > - `mvn clean package -Pproduction` will active production configuration(`application-production.properties`)
+ > - `mvn clean package -Ddevelop` will active develop configuration(`application-develop.properties`)
4. Start `mvn --projects dubbo-admin-backend spring-boot:run`
5. Visit `http://localhost:8080`
+
+### Development Setup
+* Configuration in IDE
+
+ * Select configuration files in Intellij Idea
+
+ 1. Choose profile file during project importing
+ 1. In the **Import from Maven** page where IntelliJ IDEA displays the profiles, activate the ones you need:
+ ![profile](https://raw.githubusercontent.com/apache/incubator-dubbo-ops/develop/dubbo-admin-frontend/src/assets/profile-idea.jpg)
+ 2. Select **Next** and finish import
+
+ 2. Choose profile file in the Maven Projects tool window to activate profiles.
+ 1. Open the Maven Projects tool window.
+ 2. Click the Profiles node to open a list of declared profiles.
+ 3. Select the appropriate checkboxes to activate the profiles you need.
+
+ * Select configuration files in Eclipse
+ 1. import project
+ 2. In **Project Explorer**, right click `dubbo-admin-backend`
+ 3. Choose **Maven**->**Select Maven Profiles**
+ 4. Select profile you need
+ ![profile-eclipse](https://raw.githubusercontent.com/apache/incubator-dubbo-ops/develop/dubbo-admin-frontend/src/assets/profile-eclipse.jpg)
+* Run backend project
+ backend is a standard spring boot project, you can run it in any java IDE
+* Run frontend project
+ run with `npm run dev`
+* visit webpage
+ visit `localhost://localhost:8081`, frontend support hot reload.
+
+ * CORS problem
+ in this development mode, frontend will request `localhost:8080` to fetch data, this will cause a CORS problem, so we add a configuration in `I18nConfig.java` to support CORS, this configuration will only be active under **develop** mode, please select the right maven profile to support this.
+
+
### License
Apache Dubbo ops is under the Apache 2.0 license, Version 2.0.