Running a Spring Cloud Project on Mac M1: Setup, Configuration, and Deployment Guide

This article provides a step‑by‑step tutorial for installing and configuring a Spring Cloud microservice platform on a Mac M1, covering Nacos setup, MySQL installation, microservice startup, frontend portal preparation, and admin backend deployment with troubleshooting tips.

Wukong Talks Architecture
Wukong Talks Architecture
Wukong Talks Architecture
Running a Spring Cloud Project on Mac M1: Setup, Configuration, and Deployment Guide

Hello, I am Wu Kong. This guide explains how to run my open‑source Spring Cloud project PassJava on a Mac M1, addressing compatibility issues and providing detailed configuration steps.

1. Configure Nacos

Nacos serves as both configuration and registration center. Download it from https://github.com/alibaba/nacos/releases, use version 1.4.1 for stable operation on M1, and start it with sh startup.sh -m standalone. Access the dashboard at http://127.0.0.1:8848/nacos/#/login using the default username and password nacos.

Add namespaces for the seven microservices and configure the question and thirdparty services as described in the linked articles.

2. Initialize MySQL Data

Install MySQL for macOS from https://dev.mysql.com/downloads/mysql/ (compatible with M1). Use a graphical client such as Navicat (download from http://www.navicat.com.cn/download/navicat-for-mysql) to create the required databases and execute the three SQL scripts located at /passjava-platform/data/sql, which will generate one system database and five business databases.

3. Start Microservices

Launch the four core services—gateway, question, third‑party, and system‑management—using IDEA. The system‑management service (renren‑fast) runs on port 8080, while the gateway exposes port 8060. The question service runs on port 11000 and can be tested via Postman through the gateway.

Configure the question service's database connection in /passjava-question/src/main/resources/application.yml or via Nacos.

4. Set Up the Admin Frontend (Vue)

Install npm and nvm with Homebrew, switch to the Taobao registry, and install project dependencies using cnpm install. Resolve Node‑Sass compatibility issues by uninstalling the existing package, removing node_modules, and reinstalling with cnpm install node-sass --unsafe-perm --save-dev. Then start the portal with npm run dev.

5. Launch the Admin Backend

Run npm run dev in the root directory to start the backend, which opens http://localhost:8081. Log in with username and password admin. After login, add question categories and interview questions, ensuring the third‑party service (OSS) is correctly configured.

6. Additional Notes

Elasticsearch and Kibana Docker images are not yet compatible with M1, so they cannot be used in this setup. The small‑program front‑end works fine on M1. Future articles will cover Redis integration and other middleware.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

BackendfrontendMicroservicesNacosmysqlSpring CloudMac M1
Wukong Talks Architecture
Written by

Wukong Talks Architecture

Explaining distributed systems and architecture through stories. Author of the "JVM Performance Tuning in Practice" column, open-source author of "Spring Cloud in Practice PassJava", and independently developed a PMP practice quiz mini-program.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.