JeecgBoot 2.4.5 quick single upgrade microservice official also has a description, I directly on the code where the main modification.

Docker and Docker-compose are the tools you need to use.

Step 1: Modify jeECG-boot/POM.xm

<! -- Development --> <profile> < ID >dev</id> <activation> <! -- Default activation configuration --> <activeByDefault>true</activeByDefault> </activation> <properties> <! Name >dev</profile.name> <! -- Configuration file prefix --> <prefix.name>jeecg</prefix.name> <! -- <config.server-addr> jeecG-boot-nacos :8848</config.server-addr> <! Nacos configuration center namespace for supporting multiple environments. Namespace ></config.namespace> <! --Nacos config group name --> <config.group>DEFAULT_GROUP</config.group> <! --> <discovery.server-addr>jeecg-boot-nacos:8848</discovery.server-addr> </properties> </profile>Copy the code

Add a hosts records, IP is point to redis, mysql, nacos, xxljob, rabbitmq these basic services server, if the development of the host performance is strong enough configuration for this machine IP directly

127.0.0.1 jeecg-boot-redis jeecg-boot-mysql jeecg-boot-nacos jeecg-boot-gateway jeecg-boot-system jeecg-boot-xxljob jeecg-boot-rabbitmq
Copy the code

Step 2: Modify jeecG-boot /jeecg-boot-module-system/ POM.xml

# # may choose to close the monomer start jeecg - boot/jeecg - the boot - module - the system/SRC/main/Java/org/jeecg JeecgSystemApplication. # Java annotations //@SpringBootApplicationCopy the code

Step 3: modify jeecg – boot/jeecg – cloud – the module/jeecg – cloud – gateway/SRC/main/resources/application. The yml

Step 4: modify jeecg – boot/jeecg – cloud – the module/jeecg – cloud – nacos/SRC/main/resources/application. The yml

db: num: 1 password: '0': ${MYSQL-PWD:nacos} url: '0': jdbc:mysql://${MYSQL-HOST:mysql-service}:${MYSQL-PORT:3306}/${MYSQL-DB:nacos}? characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTime zone=UTC&allowPublicKeyRetrieval=true user: '0': ${MYSQL-USER:nacos}Copy the code

Step 5: modify jeecg – boot/jeecg – cloud – the module/jeecg – cloud – xxljob/SRC/main/resources/application. The yml

Server: port: 9080 servlet: context-path: /xxl-job-admin # datasource: datasource: url jdbc:mysql://${MYSQL-HOST:jeecg-boot-mysql}:3306/xxl_job? Unicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai username: root password: rootCopy the code

Step 6: modify jeecg – boot/jeecg – the boot – module – demo/SRC/main/Java/org/jeecg JeecgDemoCloudApplication. Java

Step 7: Modify jeecg-boot/jeecg-boot-module-demo/pom.xml

At this point, MVN clean package can be used

Start using Docker to start our base service

Docker-compose path is :jeecg-boot/jeecg-cloud-module/ docker-comemage. yml

Some tweaks to the original docker-comemage.yml

version: '2' services: jeecg-boot-mysql: build: context: .. /db environment: MYSQL_ROOT_PASSWORD: root MYSQL_ROOT_HOST: '%' TZ: Asia/Shanghai restart: always container_name: jeecg-boot-mysql command: --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci --explicit_defaults_for_timestamp=true --lower_case_table_names=1 --max_allowed_packet=128M --default-authentication-plugin=caching_sha2_password ports: -3306:3306 JEECG-boot-redis: image: redis:5.0 ports: -6379:6379 restart: always container_name: jeecg-boot-redis hostname: jeecg-boot-redis jeecg-boot-nacos: restart: on-failure build: context: ./jeecg-cloud-nacos ports: - 8848:8848 depends_on: - jeecg-boot-mysql container_name: jeecg-boot-nacos environment: - MYSQL-HOST=jeecg-boot-mysql - MYSQL-PWD=root - MYSQL-USER=root hostname: jeecg-boot-nacos jeecg-boot-gateway: restart: on-failure build: context: ./jeecg-cloud-gateway ports: - 9999:9999 depends_on: - jeecg-boot-nacos - jeecg-boot-redis container_name: jeecg-boot-gateway hostname: jeecg-boot-gateway jeecg-boot-system: depends_on: - jeecg-boot-mysql - jeecg-boot-redis - jeecg-boot-nacos build: context: ./jeecg-cloud-system-start container_name: jeecg-boot-system hostname: jeecg-boot-system restart: on-failure environment: - TZ=Asia/Shanghai jeecg-boot-xxljob: build: context: ./jeecg-cloud-xxljob ports: - 9080:9080 container_name: jeecg-boot-xxljob hostname: jeecg-boot-xxljob jeecg-boot-rabbitmq: # image: rabbitmq:3-management image: rabbitmq:3 ports: - 5672:5672 # - 15672:15672 restart: always container_name: jeecg-boot-rabbitmq hostname: jeecg-boot-rabbitmqCopy the code

Docker-compose up -d will start all of them

Step 8: Modify ant-design-vue-jeecg/.env.development to start the front end

NODE_ENV=development
#VUE_APP_API_BASE_URL=http://localhost:8080/jeecg-boot
VUE_APP_API_BASE_URL=http://localhost:9999
#VUE_APP_API_BASE_URL=http://jeecg-boot-gateway:9999
VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview
Copy the code