This commit is contained in:
zhangzq
2026-05-18 15:58:26 +08:00
commit b2d13575d1
56 changed files with 2814 additions and 0 deletions

38
wms-iam/pom.xml Normal file
View File

@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.nl</groupId>
<artifactId>wms-cloud</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>wms-iam</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>wms-iam</name>
<packaging>pom</packaging>
<properties>
<java.version>21</java.version>
</properties>
<modules>
<module>wms-iam-api</module>
<module>wms-iam-server</module>
</modules>
<dependencyManagement>
<!--管理版本号-->
<dependencies></dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>

View File

@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.nl</groupId>
<artifactId>wms-iam</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>wms-iam-api</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>wms-iam-api</name>
<properties>
<java.version>21</java.version>
</properties>
<dependencies>
<!-- OpenFeign核心依赖API定义需要 -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-openfeign-core</artifactId>
<scope>provided</scope>
</dependency>
<!-- Lombok可选 -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<scope>provided</scope>
</dependency>
<!-- JacksonJSON序列化 -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- 禁用 Spring Boot 插件 -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<!--不生成spring启动器-->
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<!-- 打包源码 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@@ -0,0 +1,8 @@
package org.nl.iam.dto;
import lombok.Data;
@Data
public class Init {
private String msg;
}

View File

@@ -0,0 +1,12 @@
package org.nl.iam.feignApi;
import org.nl.iam.dto.Init;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
@FeignClient(name = "wms-iam-server",url = "http://localhost:8011", path = "/api/iam")
public interface IamFeignApi {
@GetMapping("/init")
Init init();
}

View File

@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.nl</groupId>
<artifactId>wms-iam</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>wms-iam-server</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>wms-iam-server</name>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- ===== Spring Boot Starter ===== -->
<dependency>
<groupId>org.nl</groupId>
<artifactId>wms-iam-api</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<!-- ===== Spring Cloud ===== -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<!-- ===== 工具类 ===== -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

View File

@@ -0,0 +1,15 @@
package org.nl.iam;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class WmsIamServerApplication {
static {
System.out.println("=======加载WmsIamServer=======");
}
public static void main(String[] args) {
SpringApplication.run(WmsIamServerApplication.class, args);
}
}

View File

@@ -0,0 +1,20 @@
package org.nl.iam.controller;
import lombok.RequiredArgsConstructor;
import org.nl.iam.dto.Init;
import org.nl.iam.feignApi.IamFeignApi;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequiredArgsConstructor
@RequestMapping("/api/iam")
public class IamController implements IamFeignApi {
@Override
public Init init() {
final Init init = new Init();
init.setMsg("初始化成功");
return init;
}
}

View File

@@ -0,0 +1 @@
spring.application.name=wms-iam-server