浏览代码

项目结构

by su 3 年之前
父节点
当前提交
e117c7af72

+ 15 - 0
4dkankan-center-api/4dkankan-center-scene-api/pom.xml

@@ -0,0 +1,15 @@
+<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>4dkankan-center-api</artifactId>
+        <groupId>com.fdkankan</groupId>
+        <version>2.0.0</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>4dkankan-center-scene-api</artifactId>
+
+
+</project>

+ 0 - 0
4dkankan-center-api/4dkankan-center-scene-api/src/main/java/com/fdkankan/scene/api/dto/file.txt


+ 0 - 0
4dkankan-center-api/4dkankan-center-scene-api/src/main/java/com/fdkankan/scene/api/feign/file.txt


+ 19 - 0
4dkankan-center-api/pom.xml

@@ -0,0 +1,19 @@
+<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>4dkankan-parent</artifactId>
+        <groupId>com.fdkankan</groupId>
+        <version>2.0.0</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>4dkankan-center-api</artifactId>
+    <packaging>pom</packaging>
+    <modules>
+        <module>4dkankan-center-scene-api</module>
+    </modules>
+
+
+</project>

+ 42 - 0
4dkankan-center-modeling/pom.xml

@@ -0,0 +1,42 @@
+<?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>com.fdkankan</groupId>
+		<artifactId>4dkankan-parent</artifactId>
+		<version>2.0.0</version>
+	</parent>
+	<groupId>com.fdkankan</groupId>
+	<artifactId>4dkankan-center-modeling</artifactId>
+	<version>2.0.0</version>
+	<name>4dkankan-center-modeling</name>
+	<description>计算中心</description>
+
+	<properties>
+		<java.version>1.8</java.version>
+	</properties>
+
+	<dependencies>
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-test</artifactId>
+			<scope>test</scope>
+		</dependency>
+	</dependencies>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.springframework.boot</groupId>
+				<artifactId>spring-boot-maven-plugin</artifactId>
+			</plugin>
+		</plugins>
+	</build>
+
+</project>

+ 13 - 0
4dkankan-center-modeling/src/main/java/com/fdkankan/modeling/ModelingApplication.java

@@ -0,0 +1,13 @@
+package com.fdkankan.modeling;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class ModelingApplication {
+
+	public static void main(String[] args) {
+		SpringApplication.run(ModelingApplication.class, args);
+	}
+
+}

+ 1 - 0
4dkankan-center-modeling/src/main/resources/application.properties

@@ -0,0 +1 @@
+

+ 13 - 0
4dkankan-center-modeling/src/test/java/com/fdkankan/modeling/ModelingApplicationTests.java

@@ -0,0 +1,13 @@
+package com.fdkankan.modeling;
+
+import org.junit.jupiter.api.Test;
+import org.springframework.boot.test.context.SpringBootTest;
+
+@SpringBootTest
+class ModelingApplicationTests {
+
+	@Test
+	void contextLoads() {
+	}
+
+}

+ 0 - 0
4dkankan-center-scene/src/main/java/com/fdkankan/scene/config/file.txt


+ 16 - 0
4dkankan-center-scene/src/main/java/com/fdkankan/scene/controller/TestController.java

@@ -0,0 +1,16 @@
+package com.fdkankan.scene.controller;
+
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping("/api/device")
+public class TestController {
+
+    @GetMapping("/test")
+    public String test(){
+        return "123";
+    }
+
+}

+ 0 - 0
4dkankan-center-scene/src/main/java/com/fdkankan/scene/entity/file.txt


+ 0 - 0
4dkankan-center-scene/src/main/java/com/fdkankan/scene/mapper/file.txt


+ 0 - 0
4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/file.txt


+ 0 - 0
4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/impl/file.txt


+ 4 - 4
4dkankan-gateway/src/main/java/com/fdkankan/gateway/filter/TokenFilter.java

@@ -83,8 +83,8 @@ public class TokenFilter implements GlobalFilter, Ordered {
         String path = request.getURI().getPath();
         log.info("当前路径为" + path + ",判断是否为忽略路径.");
         // 查询是否是忽略路径
-        boolean pass = decideIgnore(path);
-        if (pass) {
+        boolean ignore = decideIgnore(path);
+        if (ignore) {
             // 忽略路径直接放行
             log.info("当前路径为" + path + ",是忽略过滤路径,直接放行!");
             return chain.filter(exchange);
@@ -126,7 +126,7 @@ public class TokenFilter implements GlobalFilter, Ordered {
                 List<String> permissions = permissionMap.get(loginType);
                 Boolean isPermission = true;
                 for (String permission : permissions) {
-                    if(path.startsWith(permission)){
+                    if(path.contains(permission)){
                         isPermission = true;
                         break;
                     }
@@ -159,7 +159,7 @@ public class TokenFilter implements GlobalFilter, Ordered {
     private boolean decideIgnore(String servletPath) {
         //跳过不需要验证的路径
         for (String ignore : ignoreAuthUrls) {
-            if (servletPath.startsWith(ignore)) {
+            if (servletPath.contains(ignore)) {
                 return true;
             }
         }

+ 1 - 0
pom.xml

@@ -9,6 +9,7 @@
         <module>4dkankan-center-scene</module>
         <module>4dkankan-center-platform</module>
         <module>4dkankan-pom</module>
+        <module>4dkankan-center-api</module>
     </modules>
 
     <parent>