This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
A Spring Boot integration server ("dataserver") that bridges YunShu (云枢/cloudpivot, a low-code platform) with U8 ERP (Yonyou). It synchronizes business documents — sales orders, purchase orders, inventory, deliveries, returns, payments — between the two systems via direct SQL Server database operations and REST APIs.
mvn clean package # Build JAR (tests skipped by default)
mvn spring-boot:run # Run locally (port 9901)
java -jar target/dataserver-0.0.1-SNAPSHOT.jar # Run packaged JAR
mvn test # Run tests (skipped by default in surefire plugin)
Java 8 required. No linter or code quality tools are configured.
Three datasources configured via separate @Configuration classes with @MapperScan:
| Datasource | Config Class | Mapper Package | XML Mappers | Purpose |
|---|---|---|---|---|
| SQL Server (primary) | ConfigDbSqlsever |
mapper/ |
resources/mapper/ |
U8 ERP database (UFDATA_xxx_xxxx) |
| MySQL | ConfigDbYunshu |
mapperYunShu/ |
resources/mapperYunShu/ |
YunShu/cloudpivot platform database |
| SQL Server (UFSystem) | ConfigUFSystemSqlsever |
mapperUFSystem/ |
resources/mapperUFSystem/ |
U8 system database (user identity) |
Each datasource has its own SqlSessionFactory, DataSource, and TransactionManager. When adding new mappers, place them in the correct package and XML directory for the target datasource.
controller/ → service/ (interface) → service/impl/ → mapper/ (MyBatis interface) → XML mapper SQL
Base package: com.youwei.dataserver
JWTFilter intercepts all requests)TokenFilter and YsTokenFilterYunShu workflow forms → REST calls to this server → reads/writes U8 SQL Server + YunShu MySQL to sync business data.
Set active profile in application.yml (spring.profiles.active). Available: dev, test, pre, prod, prod2. Each profile configures database connections, Redis, and environment-specific settings.
controller/SaleController.java — Main business logic: sales orders, purchase orders, inventory, deliveries, paymentscontroller/BasicDataController.java — Master data sync (customers, suppliers, inventory items)entity/U8/ — DTOs mapping to U8 SQL Server tablesconfig/ — All Spring configuration including datasources, Redis, Shiro, WebSocket, and HTTP filterscommon/ResultCommon.java — Standard API response wrapperResultCommon wrapper@Data, @Builder, etc.)