Mastering the Pig Microservice Scaffold: Spring Cloud, Docker, and Upgrade Tips
The article introduces the Pig microservice scaffold built on Spring Cloud Hoxton and Spring Boot 2.2, outlines its key features such as OAuth2 RBAC, element‑ui integration, Docker/Kubernetes support, details version changes, provides upgrade issue solutions, and shares future plans for Hoxton and Spring Boot releases.
gitee: https://gitee.com/log4j/pig github: https://github.com/pigxcloud/pig
About the Pig Microservice Scaffold
Based on Spring Cloud Hoxton, Spring Boot 2.2, and OAuth2 RBAC permission management
Encapsulates element‑ui with a data‑driven view concept, enabling quick start without Vue experience
Provides container support for Docker, Kubernetes, and Rancher2
Offers production practices for lambda, Stream API, and WebFlux
Version Changes
Core Dependency
Version
Spring Boot
2.2.0.RELEASE
Spring Cloud
Hoxton.RC1
Spring Security OAuth2
2.3.6
Mybatis Plus
3.2.0
hutool
5.0.3
Avue
2.2.0
pig-gen 2.5.0
Supports one‑click generation of microservice applications compatible with pig 2.5.0
1 <!-- pig-gen archetype -->
2 <dependency>
3 <groupId>com.pig4cloud.archetype</groupId>
4 <artifactId>pig-gen</artifactId>
5 <version>last.version</version>
6 </dependency>Module Removal
Officially removed the pig-zipkin module
Spring Cloud now recommends using the official compiled zipkin server:
zipkin-server.jar java -jar zipkin-server.jarIssues Encountered During Upgrade
Spring Boot 2.2.0 bug caused incompatibility with Mybatis 3.5.2
Issue: https://github.com/spring-projects/spring-boot/issues/18670
Solution: Recompiled Mybatis 3.5.2 and Mybatis‑Plus 3.2.0, adjusting Maven coordinates:
<dependency>
<groupId>com.pig4cloud</groupId>
<artifactId>mybatis-plus</artifactId>
<version>3.2.0</version>
</dependency>Spring Boot Admin 2.2.0 not released
Solution: Use snapshot version 2.2.0-SNAPSHOT and configure a snapshot repository:
<repository>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</repository>Future Plans
Upgrade Hoxton to the official release, expected within the month
Upgrade Spring Boot 2.2.x to resolve Mybatis incompatibility
Revise documentation and add new feature descriptions
Potential Issues During Upgrade
Using Spring Cloud RC version not synchronized with domestic mirrors such as Alibaba Cloud may cause failures. mvn clean install Failures may occur; repeating the command a few times is recommended.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Java Architecture Diary
Committed to sharing original, high‑quality technical articles; no fluff or promotional content.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
