From 07b6a933341dc29f988b50a8e0dbf4e835c83e05 Mon Sep 17 00:00:00 2001 From: zzh <2441574824@qq.com> Date: Mon, 22 Jul 2024 09:15:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E8=80=834?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 38 ++++++ .idea/$PROJECT_FILE$ | 11 ++ .idea/.gitignore | 8 ++ .idea/encodings.xml | 10 ++ .idea/inspectionProfiles/Project_Default.xml | 5 + .idea/misc.xml | 17 +++ .idea/qaplug_profiles.xml | 12 ++ .idea/uiDesigner.xml | 124 ++++++++++++++++++ .idea/vcs.xml | 6 + biwe-common/pom.xml | 119 +++++++++++++++++ biwe-common/src/main/java/com/bwie/Main.java | 13 ++ bwie-test/pom.xml | 60 +++++++++ .../main/java/com/bwie/test/Application.java | 20 +++ .../test/sout/ScheduledPrintNameService.java | 25 ++++ bwie-test/src/main/resources/bootstrap.yml | 41 ++++++ pom.xml | 114 ++++++++++++++++ 16 files changed, 623 insertions(+) create mode 100644 .gitignore create mode 100644 .idea/$PROJECT_FILE$ create mode 100644 .idea/.gitignore create mode 100644 .idea/encodings.xml create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/qaplug_profiles.xml create mode 100644 .idea/uiDesigner.xml create mode 100644 .idea/vcs.xml create mode 100644 biwe-common/pom.xml create mode 100644 biwe-common/src/main/java/com/bwie/Main.java create mode 100644 bwie-test/pom.xml create mode 100644 bwie-test/src/main/java/com/bwie/test/Application.java create mode 100644 bwie-test/src/main/java/com/bwie/test/sout/ScheduledPrintNameService.java create mode 100644 bwie-test/src/main/resources/bootstrap.yml create mode 100644 pom.xml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5ff6309 --- /dev/null +++ b/.gitignore @@ -0,0 +1,38 @@ +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### IntelliJ IDEA ### +.idea/modules.xml +.idea/jarRepositories.xml +.idea/compiler.xml +.idea/libraries/ +*.iws +*.iml +*.ipr + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store \ No newline at end of file diff --git a/.idea/$PROJECT_FILE$ b/.idea/$PROJECT_FILE$ new file mode 100644 index 0000000..58b7e3e --- /dev/null +++ b/.idea/$PROJECT_FILE$ @@ -0,0 +1,11 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..49791f5 --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..8d66637 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..b4d5a88 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/qaplug_profiles.xml b/.idea/qaplug_profiles.xml new file mode 100644 index 0000000..9a7566c --- /dev/null +++ b/.idea/qaplug_profiles.xml @@ -0,0 +1,12 @@ + + + + + \ No newline at end of file diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml new file mode 100644 index 0000000..2b63946 --- /dev/null +++ b/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/biwe-common/pom.xml b/biwe-common/pom.xml new file mode 100644 index 0000000..2c12a1c --- /dev/null +++ b/biwe-common/pom.xml @@ -0,0 +1,119 @@ + + + 4.0.0 + + com.bwie + rikao4 + 1.0-SNAPSHOT + + + biwe-common + + + 8 + 8 + UTF-8 + + + + + org.springframework.cloud + spring-cloud-starter-bootstrap + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-sentinel + + + + org.springframework.cloud + spring-cloud-starter-loadbalancer + + + + org.springframework.cloud + spring-cloud-starter-openfeign + + + + io.jsonwebtoken + jjwt + 0.9.1 + + + + com.alibaba + fastjson + 1.2.80 + + + + org.springframework.boot + spring-boot-starter-data-redis + + + + org.springframework.boot + spring-boot-starter-validation + + + + org.apache.commons + commons-lang3 + + + + org.projectlombok + lombok + + + + cn.hutool + hutool-all + 5.8.3 + + + + com.aliyun + dysmsapi20170525 + 2.0.1 + + + + com.aliyun.oss + aliyun-sdk-oss + 3.12.0 + + + + + + + com.github.tobato + fastdfs-client + 1.26.5 + + + + org.springframework.boot + spring-boot-starter-amqp + + + diff --git a/biwe-common/src/main/java/com/bwie/Main.java b/biwe-common/src/main/java/com/bwie/Main.java new file mode 100644 index 0000000..3420667 --- /dev/null +++ b/biwe-common/src/main/java/com/bwie/Main.java @@ -0,0 +1,13 @@ +package com.bwie; + +/** + * @Author:zhangzhihao + * @name:${NAME} + * @Date:2024/7/22 8:42 + * 不准抄代码,添加注释,清楚每一行代码意思 + */ +public class Main { + public static void main(String[] args) { + System.out.println("Hello world!"); + } +} diff --git a/bwie-test/pom.xml b/bwie-test/pom.xml new file mode 100644 index 0000000..0dc3193 --- /dev/null +++ b/bwie-test/pom.xml @@ -0,0 +1,60 @@ + + + 4.0.0 + + com.bwie + rikao4 + 1.0-SNAPSHOT + + + bwie-test + + + 8 + 8 + UTF-8 + + + + in.hocg.boot + spring-boot-task + 1.0.32 + + + + com.bwie + bwie-common + 1.0-SNAPSHOT + + + + com.alibaba + druid-spring-boot-starter + 1.2.8 + + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + 2.2.2 + + + + mysql + mysql-connector-java + + + + org.springframework.boot + spring-boot-starter-web + + + + com.github.pagehelper + pagehelper-spring-boot-starter + 1.4.1 + + + diff --git a/bwie-test/src/main/java/com/bwie/test/Application.java b/bwie-test/src/main/java/com/bwie/test/Application.java new file mode 100644 index 0000000..b531f93 --- /dev/null +++ b/bwie-test/src/main/java/com/bwie/test/Application.java @@ -0,0 +1,20 @@ +package com.bwie.test; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.scheduling.annotation.EnableScheduling; + +/** + * @Author:zhangzhihao + * @name:Application + * @Date:2024/7/22 8:41 + * 不准抄代码,添加注释,清楚每一行代码意思 + */ +@SpringBootApplication +@EnableScheduling +public class Application { + public static void main(String[] args) { + SpringApplication.run(Application.class); + } + +} diff --git a/bwie-test/src/main/java/com/bwie/test/sout/ScheduledPrintNameService.java b/bwie-test/src/main/java/com/bwie/test/sout/ScheduledPrintNameService.java new file mode 100644 index 0000000..153c5af --- /dev/null +++ b/bwie-test/src/main/java/com/bwie/test/sout/ScheduledPrintNameService.java @@ -0,0 +1,25 @@ +package com.bwie.test.sout; + +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +import java.util.Date; + +/** + * @Author:zhangzhihao + * @name:ScheduledPrintNameService + * @Date:2024/7/22 8:41 + * 不准抄代码,添加注释,清楚每一行代码意思 + */ +@Component +public class ScheduledPrintNameService { + + /** + * 每5秒输出自己的名字 + */ + @Scheduled(cron = "0/5 * * * * ?") + public void soutName(){ + + System.out.println("张志浩"); + } +} diff --git a/bwie-test/src/main/resources/bootstrap.yml b/bwie-test/src/main/resources/bootstrap.yml new file mode 100644 index 0000000..8c8b285 --- /dev/null +++ b/bwie-test/src/main/resources/bootstrap.yml @@ -0,0 +1,41 @@ +# Tomcat +server: + port: 9002 +# Spring +spring: + main: + allow-circular-references: true + jackson: + date-format: yyyy-MM-dd HH:mm:ss + time-zone: GMT+8 + application: + # 应用名称 + name: bwie-test + profiles: + # 环境配置 + active: dev + cloud: + nacos: + discovery: + # 服务注册地址 + server-addr: 49.235.138.50:8848 + config: + # 配置中心地址 + server-addr: 49.235.138.50:8848 + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} +fdfs: + so-timeout: 1500 # socket 连接时长 + connect-timeout: 600 # 连接 tracker 服务器超时时长 + # 这两个是你服务器的 IP 地址,注意 23000 端口也要打开,阿里云服务器记得配置安全组。tracker 要和 stroage 服务进行交流 + tracker-list: 49.235.138.50:22122 + web-server-url: 49.235.138.50:8888 + pool: + jmx-enabled: false + # 生成缩略图 + thumb-image: + height: 500 + width: 500 diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..ae655f1 --- /dev/null +++ b/pom.xml @@ -0,0 +1,114 @@ + + + 4.0.0 + + com.bwie + rikao4 + 1.0-SNAPSHOT + pom + + biwe-common + bwie-test + + + + 8 + 8 + UTF-8 + 2021.0.0 + 2021.1 + 0.9.1 + 1.2.80 + 5.8.3 + 2.0.1 + 1.0-SNAPSHOT + 1.2.8 + 2.2.2 + 1.4.1 + + + + + + + + + spring-boot-starter-parent + org.springframework.boot + 2.6.2 + + + + + + + + org.springframework.cloud + spring-cloud-dependencies + ${spring.cloud-version} + pom + import + + + + + com.alibaba.cloud + spring-cloud-alibaba-dependencies + ${spring.cloud.alibaba-version} + pom + import + + + + io.jsonwebtoken + jjwt + ${jwt.version} + + + + com.alibaba + fastjson + ${fastjson.version} + + + + cn.hutool + hutool-all + ${hutool.version} + + + + com.aliyun + dysmsapi20170525 + ${dysms.version} + + + + com.bwie + bwie-common + ${common.version} + + + + com.alibaba + druid-spring-boot-starter + ${druid.version} + + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + ${mybatis.version} + + + + com.github.pagehelper + pagehelper-spring-boot-starter + ${pagehelper.version} + + + + +