From 4025a6af384ae6d0f1a3154af38b08b676b10c91 Mon Sep 17 00:00:00 2001 From: xins Date: Wed, 28 Feb 2024 15:18:27 +0800 Subject: [PATCH] =?UTF-8?q?1.7.1=20=E6=96=B0=E5=BB=BA=E6=89=93=E5=8D=B0?= =?UTF-8?q?=E6=9C=BA=E6=9C=8D=E5=8A=A1module=E5=92=8C=E6=89=93=E5=8D=B0?= =?UTF-8?q?=E6=9C=BA=E6=9C=8D=E5=8A=A1=E6=8E=A5=E5=8F=A3module?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hw-api/hw-api-printer/pom.xml | 28 +++++++ hw-api/pom.xml | 1 + hw-modules/hw-printer/pom.xml | 63 ++++++++++++++++ .../hw-printer/src/main/java/com/hw/Main.java | 19 +++++ .../hw-printer/src/main/resources/banner.txt | 10 +++ .../src/main/resources/bootstrap.yml | 29 ++++++++ .../hw-printer/src/main/resources/logback.xml | 74 +++++++++++++++++++ 7 files changed, 224 insertions(+) create mode 100644 hw-api/hw-api-printer/pom.xml create mode 100644 hw-modules/hw-printer/pom.xml create mode 100644 hw-modules/hw-printer/src/main/java/com/hw/Main.java create mode 100644 hw-modules/hw-printer/src/main/resources/banner.txt create mode 100644 hw-modules/hw-printer/src/main/resources/bootstrap.yml create mode 100644 hw-modules/hw-printer/src/main/resources/logback.xml diff --git a/hw-api/hw-api-printer/pom.xml b/hw-api/hw-api-printer/pom.xml new file mode 100644 index 0000000..c6d1b0c --- /dev/null +++ b/hw-api/hw-api-printer/pom.xml @@ -0,0 +1,28 @@ + + + + com.hw + hw-api + 3.6.3 + + 4.0.0 + + hw-api-printer + + + hw-api-printer打印服务接口模块 + + + + + + + com.hw + hw-common-core + + + + + diff --git a/hw-api/pom.xml b/hw-api/pom.xml index 5b4fd85..37e51c1 100644 --- a/hw-api/pom.xml +++ b/hw-api/pom.xml @@ -13,6 +13,7 @@ hw-api-tdengine hw-api-mes hw-api-ems + hw-api-printer hw-api diff --git a/hw-modules/hw-printer/pom.xml b/hw-modules/hw-printer/pom.xml new file mode 100644 index 0000000..f8152bb --- /dev/null +++ b/hw-modules/hw-printer/pom.xml @@ -0,0 +1,63 @@ + + + + com.hw + hw-modules + 3.6.3 + + 4.0.0 + + hw-modules-printer + + + hw-modules-printer打印服务模块 + + + + + + + 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.boot + spring-boot-starter-actuator + + + + + + ${project.artifactId} + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + + + + diff --git a/hw-modules/hw-printer/src/main/java/com/hw/Main.java b/hw-modules/hw-printer/src/main/java/com/hw/Main.java new file mode 100644 index 0000000..0dcc1da --- /dev/null +++ b/hw-modules/hw-printer/src/main/java/com/hw/Main.java @@ -0,0 +1,19 @@ +package com.hw; + +// Press Shift twice to open the Search Everywhere dialog and type `show whitespaces`, +// then press Enter. You can now see whitespace characters in your code. +public class Main { + public static void main(String[] args) { + // Press Alt+Enter with your caret at the highlighted text to see how + // IntelliJ IDEA suggests fixing it. + System.out.printf("Hello and welcome!"); + + // Press Shift+F10 or click the green arrow button in the gutter to run the code. + for (int i = 1; i <= 5; i++) { + + // Press Shift+F9 to start debugging your code. We have set one breakpoint + // for you, but you can always add more by pressing Ctrl+F8. + System.out.println("i = " + i); + } + } +} \ No newline at end of file diff --git a/hw-modules/hw-printer/src/main/resources/banner.txt b/hw-modules/hw-printer/src/main/resources/banner.txt new file mode 100644 index 0000000..fbd45f5 --- /dev/null +++ b/hw-modules/hw-printer/src/main/resources/banner.txt @@ -0,0 +1,10 @@ +Spring Boot Version: ${spring-boot.version} +Spring Application Name: ${spring.application.name} + _ _ + (_) | | + _ __ _ _ ___ _ _ _ ______ ___ _ _ ___ | |_ ___ _ __ ___ +| '__|| | | | / _ \ | | | || ||______|/ __|| | | |/ __|| __| / _ \| '_ ` _ \ +| | | |_| || (_) || |_| || | \__ \| |_| |\__ \| |_ | __/| | | | | | +|_| \__,_| \___/ \__, ||_| |___/ \__, ||___/ \__| \___||_| |_| |_| + __/ | __/ | + |___/ |___/ \ No newline at end of file diff --git a/hw-modules/hw-printer/src/main/resources/bootstrap.yml b/hw-modules/hw-printer/src/main/resources/bootstrap.yml new file mode 100644 index 0000000..7ef251e --- /dev/null +++ b/hw-modules/hw-printer/src/main/resources/bootstrap.yml @@ -0,0 +1,29 @@ +# Tomcat +server: + port: 7308 + +# Spring +spring: + application: + # 应用名称 + name: hw-printer + profiles: + # 环境配置 + active: dev + cloud: + nacos: + discovery: + # 服务注册地址 + server-addr: 175.27.215.92:8848 + namespace: jyhb-test + group: xins + config: + # 配置中心地址 + server-addr: 175.27.215.92:8848 + namespace: jyhb-test + group: xins + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} diff --git a/hw-modules/hw-printer/src/main/resources/logback.xml b/hw-modules/hw-printer/src/main/resources/logback.xml new file mode 100644 index 0000000..b6fa229 --- /dev/null +++ b/hw-modules/hw-printer/src/main/resources/logback.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + ${log.pattern} + + + + + + ${log.path}/info.log + + + + ${log.path}/info.%d{yyyy-MM-dd}.log + + 60 + + + ${log.pattern} + + + + INFO + + ACCEPT + + DENY + + + + + ${log.path}/error.log + + + + ${log.path}/error.%d{yyyy-MM-dd}.log + + 60 + + + ${log.pattern} + + + + ERROR + + ACCEPT + + DENY + + + + + + + + + + + + + + + + + +