Gupao Mall is a practical project in the Java architecture course of Gupao Academy to help students better implement technology. The project is based on springboot2.1.6.RELEASE+Dubbo2.7.3 to build microservices.
The business modules are divided and try to fit the architectural system of the Internet company. Therefore, except that the complexity of the business itself is not very high, the overall architecture is basically the same as the actual architecture.
But in fact, real production-level projects will become very complicated due to the number of users and the complexity of the business. Therefore, we will involve more people and iterate the project from the aspects of requirements, design, solutions, etc., so as to cultivate certain
Experience and ability to provide practical solutions.
The project adopts separate development of front-end and front-end, and the front-end needs to be deployed independently. The current core technology stack uses SpringBoot2.1.5.RELEASE+Dubbo2.7.2,
The main architecture of the backend is based on springboot+dubbo+mybatis.
db_script database script for this project | use mysql | Table splitting has not been done yet, but table splitting has been considered. |
---|---|---|
gpmall-cashier cashier, responsible for payment-related interaction logic | web project | Port 8083 |
gpmall-commons public components | jar | Public components are referenced in many places, so be careful when making changes. |
gpmall-front The front-end project of Gupao Mall | Front-end project | Develop using front-end technologies such as vue, node, es, etc. |
gpmall-parent parent control file, used to uniformly manage all jar packages | Parent control file | Versions of jar packages used to uniformly manage all projects |
gpmall-shopping product/shopping cart/homepage rendering and other interactions | web project | Port 8081 |
gpmall-user provides user-related interactions, such as login, registration, personal center, etc. | web project | Port 8082 |
market-service Dubbo service for promotional activities [joint debugging has not been completed yet, so it does not need to be started] | Dubbo service | 20884 port |
pay-service provides payment processing capabilities | Dubbo service | 20883 port |
shopping-service, provides shopping cart, recommended products, products and other services | Dubbo service | 20881 port |
user-service, provides user-related services | Dubbo service | Port 20880 |
order-service, provide order service | Dubbo service | 20882 port |
comment-service, product review service | Dubbo service | 20885 port |
PRD | Store prd requirement documents. Students who want to participate in the design can provide prd requirements. | |
wiki | Help documents require every student to contribute their own strength |
Create the gpmall database and import the sql script in db_scrpit
directory.
Start related services in the following order:
gpmall-parent, this is the parent control file of the entire project. You need to execute install to install it locally. If you have built nexus yourself, you can deploy it to nexus.
gpmall-commons, this is the common dependency of the entire project. Execute install to install it locally. If you have built nexus yourself, you can deploy it to nexus.
Note: The following microservices use mysql, redis, kafka, etc., and the relevant middleware needs to be installed in advance, and all services are configured with host addresses. It is recommended to use the hostswitch tool for unified maintenance.
user-service, user service, install the user-service-api
module to the local warehouse, because other modules have dependencies. Then start the service.
order-service, order service, install the order-service-api
module locally and make it depend on other modules
shopping-service, product service, install the shopping-service-api
module locally and make it depend on other modules
marking-service, marketing service, no function has been developed yet.
pay-service, payment service, the code has been written and debugged (but the old interface version is used. If it is a new version, the interface needs to be changed), and the appid needs to be provided. However, if this project is not started, it will not affect Functions of the previous page
comment-service, comment service, used to display product review information
The following services are BFF, which performs service aggregation and relies on the above microservice modules respectively.
gpmall-shopping
gpmall-user
gpmall-cashier
Front-end project gpmall-front, this project is developed using vue.
npm install
in gpmall-front,npm run dev
again. If the back-end services start normally, gpmall-front will forward the request to the server to obtain relevant data for rendering.You are very welcome to contribute to the development of Gpmall! You can choose the following ways to contribute to Gpmall:
<<<<<<< HEAD
=======
88aab362053f002aeff65bb3c957591fafb1c788
Author's personal blog
https://istio.tech