From d3cbf712daa839fd33ea23e435dc56d7cf5e8dfe Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期五, 13 十二月 2024 16:11:27 +0800
Subject: [PATCH] #

---
 zy-acs-fake/src/main/java/com/zy/acs/fake/FakeBoot.java       |   34 +++++
 zy-acs-fake/.gitignore                                        |   33 +++++
 zy-acs-fake/src/main/resources/logback-spring.xml             |   62 ++++++++++
 zy-acs-fake/src/main/resources/application.yml                |   78 +++++++++++++
 zy-acs-fake/src/main/resources/banner.txt                     |   23 +++
 zy-acs-fake/src/main/java/com/zy/acs/fake/TestController.java |   25 ++++
 zy-acs-fake/pom.xml                                           |   50 ++++++++
 pom.xml                                                       |    1 
 8 files changed, 306 insertions(+), 0 deletions(-)

diff --git a/pom.xml b/pom.xml
index 0677432..2dd5177 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,6 +22,7 @@
         <module>zy-acs-framework</module>
         <module>zy-acs-gateway</module>
         <module>zy-acs-manager</module>
+        <module>zy-acs-fake</module>
     </modules>
 
     <properties>
diff --git a/zy-acs-fake/.gitignore b/zy-acs-fake/.gitignore
new file mode 100644
index 0000000..549e00a
--- /dev/null
+++ b/zy-acs-fake/.gitignore
@@ -0,0 +1,33 @@
+HELP.md
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
diff --git a/zy-acs-fake/pom.xml b/zy-acs-fake/pom.xml
new file mode 100644
index 0000000..f5d9206
--- /dev/null
+++ b/zy-acs-fake/pom.xml
@@ -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>
+
+    <artifactId>acs-fake</artifactId>
+    <version>1.0.0</version>
+    <packaging>war</packaging>
+
+    <name>fake</name>
+
+    <parent>
+        <groupId>com.zy</groupId>
+        <artifactId>acs</artifactId>
+        <version>1.0.0</version>
+    </parent>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+        <java.version>1.8</java.version>
+        <mysql-driver.version>5.1.47</mysql-driver.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.zy</groupId>
+            <artifactId>acs-manager</artifactId>
+            <version>1.0.0</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.springframework.cloud</groupId>
+                    <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>rcs-fake</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
+
diff --git a/zy-acs-fake/src/main/java/com/zy/acs/fake/FakeBoot.java b/zy-acs-fake/src/main/java/com/zy/acs/fake/FakeBoot.java
new file mode 100644
index 0000000..720025e
--- /dev/null
+++ b/zy-acs-fake/src/main/java/com/zy/acs/fake/FakeBoot.java
@@ -0,0 +1,34 @@
+package com.zy.acs.fake;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.FilterType;
+import org.springframework.context.annotation.Import;
+
+@MapperScan("com.zy.**.mapper")
+@ComponentScan(value = "com.zy.acs.common.config")
+@ComponentScan(
+        basePackages ="com.zy.acs.manager.system.**",
+        excludeFilters = @ComponentScan.Filter(
+                type = FilterType.ASSIGNABLE_TYPE,
+                classes = {
+//                        com.zy.acs.manager.system.service.UserService.class,
+                        com.zy.acs.manager.system.controller.AuthController.class
+                }
+        )
+)
+@Import(value = {
+        com.zy.acs.manager.common.config.ConfigProperties.class,
+        org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder.class
+})
+@ComponentScan(basePackages = "com.zy.acs.manager.manager.**")
+@SpringBootApplication(exclude = {org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class})
+public class FakeBoot {
+
+    public static void main(String[] args) {
+        SpringApplication.run(FakeBoot.class, args);
+    }
+
+}
diff --git a/zy-acs-fake/src/main/java/com/zy/acs/fake/TestController.java b/zy-acs-fake/src/main/java/com/zy/acs/fake/TestController.java
new file mode 100644
index 0000000..20b1cf9
--- /dev/null
+++ b/zy-acs-fake/src/main/java/com/zy/acs/fake/TestController.java
@@ -0,0 +1,25 @@
+package com.zy.acs.fake;
+
+import com.zy.acs.framework.common.R;
+import com.zy.acs.manager.core.service.AgvCmdService;
+import com.zy.acs.manager.system.service.ConfigService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * Created by vincent on 12/13/2024
+ */
+@RestController
+public class TestController {
+
+    @Autowired
+    private ConfigService configService;
+
+    @GetMapping("/fake")
+    public R fake() {
+        return R.ok().add(configService.getVal("fakeSign", Boolean.class));
+    }
+
+}
diff --git a/zy-acs-fake/src/main/resources/application.yml b/zy-acs-fake/src/main/resources/application.yml
new file mode 100644
index 0000000..fb13215
--- /dev/null
+++ b/zy-acs-fake/src/main/resources/application.yml
@@ -0,0 +1,78 @@
+server:
+  port: 8888
+
+spring:
+  application:
+    name: @pom.artifactId@
+  mvc:
+    static-path-pattern: /**
+  datasource:
+    driver-class-name: com.mysql.jdbc.Driver
+    url: jdbc:mysql://127.0.0.1:3306/zy_rcs1?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+#    url: jdbc:mysql://127.0.0.1:33066/zy_rcs1?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+#    url: jdbc:mysql://mysql:3306/zy_rcs1?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+    username: root
+    password: xltys1995
+    type: com.alibaba.druid.pool.DruidDataSource
+    druid:
+      initial-size: 5
+      min-idle: 5
+      max-active: 20
+      max-wait: 30000
+      time-between-eviction-runs-millis: 60000
+      min-evictable-idle-time-millis: 300000
+      test-while-idle: true
+      test-on-borrow: true
+      test-on-return: false
+      remove-abandoned: true
+      remove-abandoned-timeout: 1800
+      #pool-prepared-statements: false
+      #max-pool-prepared-statement-per-connection-size: 20
+      filters: stat, wall
+      validation-query: SELECT 'x'
+      aop-patterns: com.zy.*.*.service.*
+      stat-view-servlet:
+        url-pattern: /druid/*
+        reset-enable: true
+        login-username: admin
+        login-password: admin
+  servlet:
+    multipart:
+      maxFileSize: 100MB
+      maxRequestSize: 100MB
+  jmx:
+    enabled: false
+
+redis:
+  host: 127.0.0.1
+  #  host: redis
+  password: xltys1995
+  port: 6379
+#  port: 63799
+  max: 30
+  min: 10
+  timeout: 5000
+  index: 3
+
+
+mybatis-plus:
+  mapper-locations: classpath:mapper/*/*.xml
+#  global-config:
+#    field-strategy: 0
+  configuration:
+#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+    map-underscore-to-camel-case: true
+    cache-enabled: true
+  global-config:
+    :banner: false
+    db-config:
+      id-type: auto
+      logic-delete-value: 1
+      logic-not-delete-value: 0
+
+logging:
+  file:
+    path: /stock/out/@pom.artifactId@/logs
+
+floyd:
+  enable: false
\ No newline at end of file
diff --git a/zy-acs-fake/src/main/resources/banner.txt b/zy-acs-fake/src/main/resources/banner.txt
new file mode 100644
index 0000000..fa04b8c
--- /dev/null
+++ b/zy-acs-fake/src/main/resources/banner.txt
@@ -0,0 +1,23 @@
+${AnsiColor.BRIGHT_BLACK}
+////////////////////////////////////////////////////////////////////
+//                          _ooOoo_                               //
+//                         o8888888o                              //
+//                         88" . "88                              //
+//                         (| ^_^ |)                              //
+//                         O\  =  /O                              //
+//                      ____/`---'\____                           //
+//                    .'  \\|     |//  `.                         //
+//                   /  \\|||  :  |||//  \                        //
+//                  /  _||||| -:- |||||-  \                       //
+//                  |   | \\\  -  /// |   |                       //
+//                  | \_|  ''\---/''  |   |                       //
+//                  \  .-\__  `-`  ___/-. /                       //
+//                ___`. .'  /--.--\  `. . ___                     //
+//              ."" '<  `.___\_<|>_/___.'  >'"".                  //
+//            | | :  `- \`.;`\ _ /`;.`/ - ` : | |                 //
+//            \  \ `-.   \_ __\ /__ _/   .-` /  /                 //
+//      ========`-.____`-.___\_____/___.-`____.-'========         //
+//                           `=---='                              //
+//      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^        //
+//            浣涚淇濅綉       姘镐笉瀹曟満     姘告棤BUG                 //
+////////////////////////////////////////////////////////////////////
diff --git a/zy-acs-fake/src/main/resources/logback-spring.xml b/zy-acs-fake/src/main/resources/logback-spring.xml
new file mode 100644
index 0000000..f72c762
--- /dev/null
+++ b/zy-acs-fake/src/main/resources/logback-spring.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+
+    <include resource="org/springframework/boot/logging/logback/defaults.xml"/>
+
+    <property name="CONSOLE_LOG_PATTERN"
+              value="%date{yyyy-MM-dd HH:mm:ss}|%highlight(%-5level)|%boldYellow(%thread)|%boldGreen(%logger) %msg%n">
+    </property>
+
+    <property name="CONSOLE_LOG_PATTERN"
+              value="%d{yyyy-MM-dd HH:mm:ss.SSS} %highlight(-%5p) ${PID:-} [%15.15t] %-40.40logger{39} : %m%n">
+    </property>
+
+    <!--鎺у埗鍙�-->
+    <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>${CONSOLE_LOG_PATTERN}</pattern>
+            <charset>UTF-8</charset>
+        </encoder>
+    </appender>
+
+    <!--info绾у埆-->
+    <appender name="INFO_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${LOG_PATH}/info.log</file>
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <FileNamePattern>${LOG_PATH}/info_%d{yyyy-MM-dd}.%i.log</FileNamePattern>
+            <maxHistory>10</maxHistory>
+            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+                <maxFileSize>10MB</maxFileSize>
+            </timeBasedFileNamingAndTriggeringPolicy>
+        </rollingPolicy>
+        <encoder>
+            <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{35} - %msg %n</pattern>
+            <charset>UTF-8</charset>
+        </encoder>
+    </appender>
+
+    <!--error绾у埆-->
+    <appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+            <level>ERROR</level>
+        </filter>
+        <file>${LOG_PATH}/error.log</file>
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <FileNamePattern>${LOG_PATH}/error_%d{yyyy-MM-dd}.%i.log</FileNamePattern>
+            <maxHistory>10</maxHistory>
+            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+                <maxFileSize>10MB</maxFileSize>
+            </timeBasedFileNamingAndTriggeringPolicy>
+        </rollingPolicy>
+        <encoder>
+            <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{35} - %msg %n</pattern>
+            <charset>UTF-8</charset>
+        </encoder>
+    </appender>
+
+    <root level="INFO">
+        <appender-ref ref="CONSOLE"/>
+        <appender-ref ref="INFO_FILE"/>
+        <appender-ref ref="ERROR_FILE"/>
+    </root>
+</configuration>
\ No newline at end of file

--
Gitblit v1.9.1