From c24f79e11cb1949afe416c8cab8255b3355a7fc3 Mon Sep 17 00:00:00 2001 From: hongawen <83944980@qq.com> Date: Tue, 13 Aug 2024 19:29:04 +0800 Subject: [PATCH] =?UTF-8?q?init=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 32 +++- entrance/pom.xml | 49 ++++++ .../com/njcn/gather/EntranceApplication.java | 18 +++ entrance/src/main/resources/application.yml | 12 ++ entrance/src/main/resources/logback.xml | 142 ++++++++++++++++++ pom.xml | 64 ++++++++ system/pom.xml | 35 +++++ .../njcn/gather/system/controller/Hello.java | 16 ++ user/pom.xml | 21 +++ user/src/main/java/com/njcn/gather/Main.java | 7 + 10 files changed, 392 insertions(+), 4 deletions(-) create mode 100644 entrance/pom.xml create mode 100644 entrance/src/main/java/com/njcn/gather/EntranceApplication.java create mode 100644 entrance/src/main/resources/application.yml create mode 100644 entrance/src/main/resources/logback.xml create mode 100644 pom.xml create mode 100644 system/pom.xml create mode 100644 system/src/main/java/com/njcn/gather/system/controller/Hello.java create mode 100644 user/pom.xml create mode 100644 user/src/main/java/com/njcn/gather/Main.java diff --git a/.gitignore b/.gitignore index 9154f4c7..15cc7a6c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,9 @@ -# ---> Java # Compiled class file *.class +*.iml +*.idea +target/ +logs/ # Log file *.log @@ -14,13 +17,34 @@ # Package Files # *.jar *.war -*.nar *.ear -*.zip *.tar.gz *.rar # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* -replay_pid* +*velocity.log* + +# Eclipse # +.classpath +.project +.settings/ + +.DS_Store + +_dockerCerts/ + +.factorypath + +node_modules/ +package-lock.json +yarn.lock + +rebel.xml + +!DmJdbcDriver18.jar +!kingbase8-8.6.0.jar +/.fastRequest/collections/Root/Default Group/directory.json +/.fastRequest/collections/Root/directory.json +/.fastRequest/config/fastRequestCurrentProjectConfig.json diff --git a/entrance/pom.xml b/entrance/pom.xml new file mode 100644 index 00000000..4aba6278 --- /dev/null +++ b/entrance/pom.xml @@ -0,0 +1,49 @@ + + + 4.0.0 + + com.njcn.gather + CN_Gather + 1.0.0 + + entrance + + + + com.njcn.gather + system + 1.0.0 + + + + + entrance + + + org.springframework.boot + spring-boot-maven-plugin + + + package + + repackage + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 1.8 + 1.8 + + + + + + \ No newline at end of file diff --git a/entrance/src/main/java/com/njcn/gather/EntranceApplication.java b/entrance/src/main/java/com/njcn/gather/EntranceApplication.java new file mode 100644 index 00000000..c1a52fa4 --- /dev/null +++ b/entrance/src/main/java/com/njcn/gather/EntranceApplication.java @@ -0,0 +1,18 @@ +package com.njcn.gather; + +import lombok.extern.slf4j.Slf4j; +//import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + + +@Slf4j +//@MapperScan("com.njcn.**.mapper") +@SpringBootApplication(scanBasePackages = "com.njcn") +public class EntranceApplication { + + public static void main(String[] args) { + SpringApplication.run(EntranceApplication.class, args); + } + +} diff --git a/entrance/src/main/resources/application.yml b/entrance/src/main/resources/application.yml new file mode 100644 index 00000000..d9860434 --- /dev/null +++ b/entrance/src/main/resources/application.yml @@ -0,0 +1,12 @@ +server: + port: 18092 +spring: + application: + name: entrance + +log: + home: D:\logs + +logging: + level: + root: info \ No newline at end of file diff --git a/entrance/src/main/resources/logback.xml b/entrance/src/main/resources/logback.xml new file mode 100644 index 00000000..04a373dd --- /dev/null +++ b/entrance/src/main/resources/logback.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + ${log.pattern} + + UTF-8 + + + + + + + + ${log.homeDir}/${log.projectName}/debug/debug.log + + + + + DEBUG + + ACCEPT + + DENY + + + + + + ${log.homeDir}/${log.projectName}/debug/debug.log.%d{yyyy-MM-dd}.%i.log + + 10MB + + ${log.maxHistory:-30} + + + + + + + + + + ${log.pattern} + + UTF-8 + + + + + + + INFO + ACCEPT + DENY + + + ${log.homeDir}/${log.projectName}/info/info.log + + + + ${log.homeDir}/${log.projectName}/info/info.log.%d{yyyy-MM-dd}.%i.log + + 10MB + ${log.maxHistory:-30} + + + + ${log.pattern} + + UTF-8 + + + + + + + + ${log.homeDir}/${log.projectName}/error/error.log + + + ERROR + ACCEPT + DENY + + + + ${log.homeDir}/${log.projectName}/error/error.log.%d{yyyy-MM-dd}.%i.log + + 10MB + ${log.maxHistory:-30} + + + + ${log.pattern} + + UTF-8 + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pom.xml b/pom.xml new file mode 100644 index 00000000..6cdf0831 --- /dev/null +++ b/pom.xml @@ -0,0 +1,64 @@ + + + 4.0.0 + + com.njcn.gather + CN_Gather + 1.0.0 + + entrance + system + user + + pom + 融合各工具的项目 + + + nexus-releases + Nexus Release Repository + http://192.168.1.22:8001/nexus/content/repositories/releases/ + + + nexus-snapshots + Nexus Snapshot Repository + http://192.168.1.22:8001/nexus/content/repositories/snapshots/ + + + + + + + org.springframework.boot + spring-boot-maven-plugin + 2.2.2.RELEASE + + true + true + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 1.8 + 1.8 + + + + + + src/main/resources + true + + + src/main/java + + **/*.xml + + + + + diff --git a/system/pom.xml b/system/pom.xml new file mode 100644 index 00000000..4c16e371 --- /dev/null +++ b/system/pom.xml @@ -0,0 +1,35 @@ + + + 4.0.0 + + com.njcn.gather + CN_Gather + 1.0.0 + + system + + + com.njcn + njcn-common + 0.0.1 + + + + + + + + + + com.njcn + spingboot2.3.12 + 2.3.12 + + + + + + + \ No newline at end of file diff --git a/system/src/main/java/com/njcn/gather/system/controller/Hello.java b/system/src/main/java/com/njcn/gather/system/controller/Hello.java new file mode 100644 index 00000000..030a39c6 --- /dev/null +++ b/system/src/main/java/com/njcn/gather/system/controller/Hello.java @@ -0,0 +1,16 @@ +package com.njcn.gather.system.controller; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@Slf4j +@RestController +public class Hello { + + @RequestMapping("/hello") + public String hello(){ + log.info("hello"); + return "hello"; + } +} diff --git a/user/pom.xml b/user/pom.xml new file mode 100644 index 00000000..714edf46 --- /dev/null +++ b/user/pom.xml @@ -0,0 +1,21 @@ + + + 4.0.0 + + com.njcn.gather + CN_Gather + 1.0.0 + + + com.njcn.gather + user + + + 8 + 8 + UTF-8 + + + \ No newline at end of file diff --git a/user/src/main/java/com/njcn/gather/Main.java b/user/src/main/java/com/njcn/gather/Main.java new file mode 100644 index 00000000..93935dc9 --- /dev/null +++ b/user/src/main/java/com/njcn/gather/Main.java @@ -0,0 +1,7 @@ +package com.njcn.gather; + +public class Main { + public static void main(String[] args) { + System.out.println("Hello world!"); + } +} \ No newline at end of file