-
Notifications
You must be signed in to change notification settings - Fork 148
new houserush sample framework #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| ### The business background of my planing project: | ||
| Traditionally, a real estate developer in china will show their nearing completion buildings to the customers for a couple of days, then determine an open sale time for all customers to make real deal offline. Those customers have to get to sale place long before the open sale time and queue up,because only in this way they get the chances to pick the apartment which they like mostly. | ||
| So recently, more and more real estate developers begin to build an online apartments/houses open sale system. The e-commerce system help their customer to pick the houses more easily and more fairly. This is the system which I plan to build with ServiceComb. | ||
|
|
||
| ### Why I choose this project as a guiding sample of ServiceComb? | ||
| Real estate developers use this system to make a deal with their customer online. So, yes! This is a real e-commerce system with real commercial value. But this is also a real simple e-commerce system which has no payment and shipping module. So Its simplicity is good for the guiding purpose. Meanwhile, because these trading subjects of this system are very expensive,and there will be high QPS when the open sale time just arrives. So There are high requirements for the system’s scalability, availability and robustness.It’s an applicable project to show ServiceComb’s abilities. | ||
|
|
||
| ### Requirements & Basic Setup | ||
| 1. Setup the requirements | ||
| - setup git, see [git install overview](https://git-scm.com/book/zh/v2/%E8%B5%B7%E6%AD%A5-%E5%AE%89%E8%A3%85-Git) | ||
| - setup JDK 1.8, see [JDK install overview](https://docs.oracle.com/javase/8/docs/technotes/guides/install/install_overview.html) | ||
| - setup Maven 3.x, 详情可参考[Maven install guide](https://maven.apache.org/install.html) | ||
| 2. Setup and run the service center | ||
| - setup Docker, see [Docker setup guide](https://www.docker.com/get-started)。 | ||
| - input in the terminal <code>$ docker run -d -p 30100:30100 servicecomb/service-center:latest</code>run service-center at port 30100 | ||
| 3. Setup the database | ||
|
|
||
| 4. check & change the src/main/resources/microservice.yaml and src/main/resources/application.yaml configuration file. | ||
|
|
||
| 5. run each microservice process by mvn spring-boot:run. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!-- | ||
| ~ Licensed to the Apache Software Foundation (ASF) under one or more | ||
| ~ contributor license agreements. See the NOTICE file distributed with | ||
| ~ this work for additional information regarding copyright ownership. | ||
| ~ The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| ~ (the "License"); you may not use this file except in compliance with | ||
| ~ the License. You may obtain a copy of the License at | ||
| ~ | ||
| ~ http://www.apache.org/licenses/LICENSE-2.0 | ||
| ~ | ||
| ~ Unless required by applicable law or agreed to in writing, software | ||
| ~ distributed under the License is distributed on an "AS IS" BASIS, | ||
| ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| ~ See the License for the specific language governing permissions and | ||
| ~ limitations under the License. | ||
| --> | ||
|
|
||
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| <parent> | ||
| <artifactId>houserush</artifactId> | ||
| <groupId>org.apache.servicecomb.samples.practice</groupId> | ||
| <version>0.0.1-SNAPSHOT</version> | ||
| </parent> | ||
|
|
||
| <modelVersion>4.0.0</modelVersion> | ||
|
|
||
| <artifactId>houserush-customer-manage</artifactId> | ||
| <name>Java Chassis::Samples::Practice::HouseRush-Customer-Manage</name> | ||
|
|
||
| <dependencies> | ||
| <dependency> | ||
| <groupId>org.springframework.boot</groupId> | ||
| <artifactId>spring-boot-starter</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.springframework.boot</groupId> | ||
| <artifactId>spring-boot-starter-data-jpa</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.springframework.boot</groupId> | ||
| <artifactId>spring-boot-starter</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.servicecomb</groupId> | ||
| <artifactId>spring-boot-starter-provider</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.servicecomb</groupId> | ||
| <artifactId>handler-flowcontrol-qps</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.servicecomb</groupId> | ||
| <artifactId>handler-bizkeeper</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.servicecomb</groupId> | ||
| <artifactId>handler-tracing-zipkin</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>mysql</groupId> | ||
| <artifactId>mysql-connector-java</artifactId> | ||
| </dependency> | ||
| </dependencies> | ||
|
|
||
| <build> | ||
| <plugins> | ||
| <plugin> | ||
| <groupId>org.springframework.boot</groupId> | ||
| <artifactId>spring-boot-maven-plugin</artifactId> | ||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
| </project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <project xmlns="http://maven.apache.org/POM/4.0.0" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| <parent> | ||
| <artifactId>houserush</artifactId> | ||
| <groupId>org.apache.servicecomb.samples.practice</groupId> | ||
| <version>0.0.1-SNAPSHOT</version> | ||
| </parent> | ||
|
|
||
| <modelVersion>4.0.0</modelVersion> | ||
|
|
||
| <artifactId>houserush-doc</artifactId> | ||
| <name>Java Chassis::Samples::Practice::HouseRush-Doc</name> | ||
| </project> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| Hi, All | ||
|
|
||
| Recently, I communicated with some ServiceComb new users, they want an e-commerce system ServiceComb sample project with real business background. They think with this demo they can learn ServiceComb’s abilities and usages **more efficiently**. | ||
|
|
||
| Then I found this project https://github.com/apache/servicecomb-samples. So I want to develop an e-commerce system demo and **devote** it to this project as this project’s sub-project. | ||
|
|
||
| *** | ||
|
|
||
| ###The business background of my planing project: | ||
| Traditionally, a real estate developer in china will show their nearing completion buildings to the customers for a couple of days, then determine an open sale time for all customers to make real deal offline. Those customers have to get to sale place long before the open sale time and queue up,because only in this way they get the chances to pick the apartment which they like mostly. | ||
| So recently, more and more real estate developers begin to build an online apartments/houses open sale system. The e-commerce system help their customer to pick the houses more easily and more fairly. This is the system which I plan to build with ServiceComb. | ||
|
|
||
| ###Why I choose this project as a guiding sample of ServiceComb? | ||
| Real estate developers use this system to make a deal with their customer online. So, yes! This is a real e-commerce system with real commercial value. But this is also a real simple e-commerce system which has no payment and shipping module. So Its simplicity is good for the guiding purpose. Meanwhile, because these trading subjects of this system are very expensive,and there will be high QPS when the open sale time just arrives. So There are high requirements for the system’s scalability, availability and robustness.It’s an applicable project to show ServiceComb’s abilities. | ||
|
|
||
| ###Any questions and suggestions? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!-- | ||
| ~ Licensed to the Apache Software Foundation (ASF) under one or more | ||
| ~ contributor license agreements. See the NOTICE file distributed with | ||
| ~ this work for additional information regarding copyright ownership. | ||
| ~ The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| ~ (the "License"); you may not use this file except in compliance with | ||
| ~ the License. You may obtain a copy of the License at | ||
| ~ | ||
| ~ http://www.apache.org/licenses/LICENSE-2.0 | ||
| ~ | ||
| ~ Unless required by applicable law or agreed to in writing, software | ||
| ~ distributed under the License is distributed on an "AS IS" BASIS, | ||
| ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| ~ See the License for the specific language governing permissions and | ||
| ~ limitations under the License. | ||
| --> | ||
|
|
||
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| <parent> | ||
| <artifactId>houserush</artifactId> | ||
| <groupId>org.apache.servicecomb.samples.practice</groupId> | ||
| <version>0.0.1-SNAPSHOT</version> | ||
| </parent> | ||
| <modelVersion>4.0.0</modelVersion> | ||
|
|
||
| <artifactId>houserush-webapp</artifactId> | ||
| <name>Java Chassis::Samples::Practice::HouseRush-webapp</name> | ||
|
|
||
| <dependencies> | ||
| <dependency> | ||
| <groupId>org.springframework.boot</groupId> | ||
| <artifactId>spring-boot-starter</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.servicecomb</groupId> | ||
| <artifactId>transport-rest-vertx</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.servicecomb</groupId> | ||
| <artifactId>spring-boot-starter-servicecomb</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.servicecomb</groupId> | ||
| <artifactId>spring-boot-starter-discovery</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.servicecomb</groupId> | ||
| <artifactId>spring-cloud-zuul</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.servicecomb</groupId> | ||
| <artifactId>spring-cloud-zuul-zipkin</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>com.auth0</groupId> | ||
| <artifactId>java-jwt</artifactId> | ||
| <version>3.8.1</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.json</groupId> | ||
| <artifactId>json</artifactId> | ||
| <version>20180813</version> | ||
| </dependency> | ||
| </dependencies> | ||
|
|
||
| <build> | ||
| <plugins> | ||
| <plugin> | ||
| <groupId>org.springframework.boot</groupId> | ||
| <artifactId>spring-boot-maven-plugin</artifactId> | ||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
| </project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!-- | ||
| ~ Licensed to the Apache Software Foundation (ASF) under one or more | ||
| ~ contributor license agreements. See the NOTICE file distributed with | ||
| ~ this work for additional information regarding copyright ownership. | ||
| ~ The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| ~ (the "License"); you may not use this file except in compliance with | ||
| ~ the License. You may obtain a copy of the License at | ||
| ~ | ||
| ~ http://www.apache.org/licenses/LICENSE-2.0 | ||
| ~ | ||
| ~ Unless required by applicable law or agreed to in writing, software | ||
| ~ distributed under the License is distributed on an "AS IS" BASIS, | ||
| ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| ~ See the License for the specific language governing permissions and | ||
| ~ limitations under the License. | ||
| --> | ||
|
|
||
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| <parent> | ||
| <artifactId>houserush</artifactId> | ||
| <groupId>org.apache.servicecomb.samples.practice</groupId> | ||
| <version>0.0.1-SNAPSHOT</version> | ||
| </parent> | ||
| <modelVersion>4.0.0</modelVersion> | ||
|
|
||
| <artifactId>houserush-house-order</artifactId> | ||
| <name>Java Chassis::Samples::Practice::HouseRush-House-Order</name> | ||
|
|
||
| <dependencies> | ||
| <dependency> | ||
| <groupId>org.springframework.boot</groupId> | ||
| <artifactId>spring-boot-starter</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.springframework.boot</groupId> | ||
| <artifactId>spring-boot-starter-data-jpa</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>mysql</groupId> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We cannot use the mysql connector due to the license issue, please switch it to postgresql.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will change it, thx. |
||
| <artifactId>mysql-connector-java</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.servicecomb</groupId> | ||
| <artifactId>spring-boot-starter-provider</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.servicecomb</groupId> | ||
| <artifactId>handler-flowcontrol-qps</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.servicecomb</groupId> | ||
| <artifactId>handler-bizkeeper</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.servicecomb</groupId> | ||
| <artifactId>handler-tracing-zipkin</artifactId> | ||
| </dependency> | ||
| </dependencies> | ||
|
|
||
| <build> | ||
| <plugins> | ||
| <plugin> | ||
| <groupId>org.springframework.boot</groupId> | ||
| <artifactId>spring-boot-maven-plugin</artifactId> | ||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
| </project> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!-- | ||
| ~ Licensed to the Apache Software Foundation (ASF) under one or more | ||
| ~ contributor license agreements. See the NOTICE file distributed with | ||
| ~ this work for additional information regarding copyright ownership. | ||
| ~ The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| ~ (the "License"); you may not use this file except in compliance with | ||
| ~ the License. You may obtain a copy of the License at | ||
| ~ | ||
| ~ http://www.apache.org/licenses/LICENSE-2.0 | ||
| ~ | ||
| ~ Unless required by applicable law or agreed to in writing, software | ||
| ~ distributed under the License is distributed on an "AS IS" BASIS, | ||
| ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| ~ See the License for the specific language governing permissions and | ||
| ~ limitations under the License. | ||
| --> | ||
|
|
||
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| <parent> | ||
| <artifactId>houserush</artifactId> | ||
| <groupId>org.apache.servicecomb.samples.practice</groupId> | ||
| <version>0.0.1-SNAPSHOT</version> | ||
| </parent> | ||
| <modelVersion>4.0.0</modelVersion> | ||
|
|
||
| <artifactId>houserush-login</artifactId> | ||
| <name>Java Chassis::Samples::Practice::HouseRush-Login</name> | ||
|
|
||
| <dependencies> | ||
| <dependency> | ||
| <groupId>org.springframework.boot</groupId> | ||
| <artifactId>spring-boot-starter</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.springframework.boot</groupId> | ||
| <artifactId>spring-boot-starter-data-jpa</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.springframework.boot</groupId> | ||
| <artifactId>spring-boot-starter</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.servicecomb</groupId> | ||
| <artifactId>spring-boot-starter-provider</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.servicecomb</groupId> | ||
| <artifactId>handler-flowcontrol-qps</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.servicecomb</groupId> | ||
| <artifactId>handler-bizkeeper</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.servicecomb</groupId> | ||
| <artifactId>handler-tracing-zipkin</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>mysql</groupId> | ||
| <artifactId>mysql-connector-java</artifactId> | ||
| </dependency> | ||
| </dependencies> | ||
|
|
||
| <build> | ||
| <plugins> | ||
| <plugin> | ||
| <groupId>org.springframework.boot</groupId> | ||
| <artifactId>spring-boot-maven-plugin</artifactId> | ||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
| </project> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to add Apache License.