Compare commits
18 Commits
v2.1-local
...
v3.0.0-nat
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8e2281060c | ||
|
|
e2d44f9e89 | ||
|
|
40a3a12233 | ||
|
|
7a145c40bd | ||
|
|
89efefd7c1 | ||
|
|
c3e0a2cf6e | ||
|
|
b80bdb6370 | ||
|
|
9f35e58970 | ||
|
|
e0d0e9701b | ||
|
|
90c2dc3a05 | ||
|
|
d51ffb35c9 | ||
|
|
eaec895ff0 | ||
|
|
4d660bbff8 | ||
|
|
70f55ef987 | ||
|
|
773a759473 | ||
|
|
ed7ce1279a | ||
|
|
524f0f63ae | ||
|
|
a6699e26a7 |
170
.gitea/workflows/build.yml
Normal file
170
.gitea/workflows/build.yml
Normal file
@@ -0,0 +1,170 @@
|
|||||||
|
name: Build Push and Deploy Image
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
#tag 触发
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
# 分支触发
|
||||||
|
# branches:
|
||||||
|
# - main
|
||||||
|
workflow_dispatch: #手动构建h
|
||||||
|
|
||||||
|
#设置全局环境变量
|
||||||
|
env:
|
||||||
|
PATH: /opt/node/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
|
REGISTRY: ${{ secrets.DOCKER_REGISTRY }}
|
||||||
|
IMAGE_NAMESPACE: bamanker # todo 可以通过读取pom文件获取下面这些属性值
|
||||||
|
IMAGE_NAME: dailylove
|
||||||
|
APP_NAME: daily-love
|
||||||
|
|
||||||
|
# 构建 Job
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-node22 # 如果host构建:linux_amd64
|
||||||
|
# container:
|
||||||
|
# image: swr.cn-north-4.myhuaweicloud.com/ddn-k8s/ghcr.io/catthehacker/ubuntu:act-latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Print system info 1
|
||||||
|
run: echo " The job was automatically triggered by a ${{ gitea.event_name }} event."
|
||||||
|
|
||||||
|
- name: Print system info 2
|
||||||
|
run: echo " This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
||||||
|
|
||||||
|
- name: Print system info 3
|
||||||
|
run: echo " The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
||||||
|
|
||||||
|
- name: Print env
|
||||||
|
run: env && blkid
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
apt-get update &&
|
||||||
|
apt-get install -y gettext &&
|
||||||
|
apt-get install -y maven &&
|
||||||
|
apt-get install -y sudo &&
|
||||||
|
apt-get install -y iptables
|
||||||
|
|
||||||
|
- name: Set up Docker
|
||||||
|
uses: http://139.9.216.111:3000/bamanker/setup-docker-action@v4.6.0
|
||||||
|
with:
|
||||||
|
# 版本大于28会有兼容性问题
|
||||||
|
version: type=archive,channel=stable,version=v27.4.0
|
||||||
|
daemon-config: |
|
||||||
|
{
|
||||||
|
"registry-mirrors":["https://docker.1ms.run"],
|
||||||
|
"dns": ["8.8.8.8", "114.114.114.114"]
|
||||||
|
}
|
||||||
|
- name: Generate maven config
|
||||||
|
uses: http://139.9.216.111:3000/bamanker/maven-settings-action@v3.1.0
|
||||||
|
with:
|
||||||
|
mirrors: '[{"id": "alimaven", "name": "aliyun maven", "mirrorOf": "central", "url": "http://maven.aliyun.com/nexus/content/groups/public/"}]'
|
||||||
|
|
||||||
|
# - uses: http://localhost:3000/bamanker/setup-node@v6
|
||||||
|
# with:
|
||||||
|
# node-version: 24
|
||||||
|
# cache: 'npm'
|
||||||
|
# - run: node -v
|
||||||
|
# 下载仓库源码,依赖node环境,因此构建服务器本地需要下载安装node并设置环境变量
|
||||||
|
|
||||||
|
- name: Checkout repository code
|
||||||
|
#使用自定义仓库action
|
||||||
|
uses: http://139.9.216.111:3000/bamanker/checkout@v4
|
||||||
|
|
||||||
|
# 获取 TAG 并设置为环境变量
|
||||||
|
- name: Get version
|
||||||
|
id: get_version
|
||||||
|
# e.g. refs/tags/v1.0.0
|
||||||
|
run: |
|
||||||
|
echo "APP_TAG=${GITHUB_REF/refs\/tags\/v}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
# 检查 TAG 并传参
|
||||||
|
- name: Set envVar
|
||||||
|
id: set_envar
|
||||||
|
run: |
|
||||||
|
echo "The app version is $APP_TAG" && echo "tag=$APP_TAG" >> $GITHUB_OUTPUT &&
|
||||||
|
echo "now workspace: ${{ github.workspace }}"
|
||||||
|
|
||||||
|
# 为其他配置文件注入环境变量
|
||||||
|
- name: Inject envVar
|
||||||
|
run: |
|
||||||
|
envsubst < ./deployment-temp.yml > ./deployment.yml &&
|
||||||
|
cat ./deployment.yml
|
||||||
|
|
||||||
|
# 安装java环境
|
||||||
|
- name: Set up Java
|
||||||
|
uses: http://139.9.216.111:3000/bamanker/setup-graalvm@v1
|
||||||
|
with:
|
||||||
|
distribution: 'graalvm'
|
||||||
|
java-version: '25.0.1'
|
||||||
|
cache: 'maven'
|
||||||
|
# maven 构建
|
||||||
|
- name: Build with Maven
|
||||||
|
run: mvn clean native:compile -DskipTests -Pnative
|
||||||
|
|
||||||
|
# 登录镜像仓库,方便后续上传镜像
|
||||||
|
- name: Login to Docker Registry
|
||||||
|
uses: http://139.9.216.111:3000/bamanker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ${{ env.REGISTRY }}
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||||
|
|
||||||
|
# # 获取时间戳
|
||||||
|
# - name: Get datetime
|
||||||
|
# id: datetime
|
||||||
|
# run: |
|
||||||
|
# echo "datetime=$(date '+%Y-%m-%d-%H-%M-%S')" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
# 构建并上传镜像
|
||||||
|
- name: Build and push Docker image
|
||||||
|
# uses: http://139.9.216.111:3000/bamanker/build-push-action@v4
|
||||||
|
# 获取上一步截取到的版本号,既 1.0.0
|
||||||
|
#只能这样接收
|
||||||
|
env:
|
||||||
|
TAG: ${{ steps.set_envar.outputs.tag }}
|
||||||
|
run: |
|
||||||
|
ls &&
|
||||||
|
docker build --file Dockerfile --tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}:${{ env.TAG }} . &&
|
||||||
|
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
|
||||||
|
|
||||||
|
# uses: http://139.9.216.111:3000/bamanker/docker-build-push@v5
|
||||||
|
# with:
|
||||||
|
# context: .
|
||||||
|
## platforms: linux/amd64
|
||||||
|
# file: Dockerfile
|
||||||
|
# push: true
|
||||||
|
# tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
|
||||||
|
|
||||||
|
#发布到 k8s
|
||||||
|
#安装 kubectl
|
||||||
|
- name: Setup kubectl
|
||||||
|
run: |
|
||||||
|
curl -LO "https://dl.k8s.io/release/v1.33.0/bin/linux/amd64/kubectl" &&
|
||||||
|
chmod +x kubectl &&
|
||||||
|
mv kubectl /usr/local/bin/
|
||||||
|
|
||||||
|
- name: Configure kubeconfig
|
||||||
|
# 假设您的 KUBE_CONFIG 秘密是 Base64 编码的 kubeconfig 文件内容
|
||||||
|
run: |
|
||||||
|
# 1. 创建 ~/.kube 目录
|
||||||
|
mkdir -p $HOME/.kube
|
||||||
|
|
||||||
|
# 2. 将 Base64 编码的 KUBE_CONFIG 秘密解码并写入默认配置文件
|
||||||
|
echo "${{ secrets.KUBE_CONFIG }}" | base64 -d > $HOME/.kube/config
|
||||||
|
|
||||||
|
# 3. 确保 kubectl 知道配置文件的位置 (可选, 但安全)
|
||||||
|
echo "KUBECONFIG=$HOME/.kube/config" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Deploy with kubectl
|
||||||
|
run: |
|
||||||
|
kubectl apply -f ./deployment.yml
|
||||||
|
|
||||||
|
- name: k8s Check Pods Health
|
||||||
|
run: |
|
||||||
|
kubectl get pod -n default -l app=${{ env.APP_NAME }}
|
||||||
|
|
||||||
|
- name: k8s Update Deployment
|
||||||
|
run: |
|
||||||
|
kubectl rollout restart deployment ${{ env.APP_NAME }}
|
||||||
@@ -1,8 +1,5 @@
|
|||||||
FROM ubuntu:jammy-20231004
|
FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/ubuntu:jammy
|
||||||
MAINTAINER bamanker
|
MAINTAINER bamanker
|
||||||
ARG NATIVE_FILE
|
COPY target/dailylove /root/dailylove/
|
||||||
ENV NATIVE_FILE=${NATIVE_FILE}
|
|
||||||
COPY target/${NATIVE_FILE} /home/${NATIVE_FILE}/app
|
|
||||||
EXPOSE 13145
|
EXPOSE 13145
|
||||||
WORKDIR /home/${NATIVE_FILE}/out
|
CMD /root/dailylove/dailylove -XX:StartFlightRecording='filename=recording.jfr,dumponexit=true,duration=10s'
|
||||||
ENTRYPOINT /home/${NATIVE_FILE}/app -XX:StartFlightRecording='filename=recording.jfr,dumponexit=true,duration=10s'
|
|
||||||
70
deployment-temp.yaml
Normal file
70
deployment-temp.yaml
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: $APP_NAME
|
||||||
|
version: $APP_TAG
|
||||||
|
name: $APP_NAME
|
||||||
|
namespace: dl-proj #一定要写名称空间
|
||||||
|
spec:
|
||||||
|
progressDeadlineSeconds: 600
|
||||||
|
replicas: 1
|
||||||
|
revisionHistoryLimit: 2
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: $APP_NAME
|
||||||
|
strategy:
|
||||||
|
rollingUpdate:
|
||||||
|
maxSurge: 50%
|
||||||
|
maxUnavailable: 50%
|
||||||
|
type: RollingUpdate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: $APP_NAME
|
||||||
|
version: $APP_TAG
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: dockerhub-id #提前在项目下配置访问阿里云的账号密码
|
||||||
|
containers:
|
||||||
|
- image: $REGISTRY/$IMAGE_NAMESPACE/$IMAGE_NAME:$APP_TAG
|
||||||
|
name: $APP_NAME
|
||||||
|
imagePullPolicy: Always
|
||||||
|
livenessProbe: # 存活探针:失败意味着应用彻底挂了,需要重启来恢复
|
||||||
|
httpGet:
|
||||||
|
path: /test
|
||||||
|
port: 9090
|
||||||
|
initialDelaySeconds: 10 # 延迟xx秒开始执行
|
||||||
|
periodSeconds: 15 # 每隔15秒执行一次
|
||||||
|
timeoutSeconds: 10 # 10秒未返回结果则超时
|
||||||
|
failureThreshold: 10 # 探测失败后的重试次数,当达到这个次数后就判定结果为失败
|
||||||
|
# successThreshold: 5
|
||||||
|
ports:
|
||||||
|
- containerPort: 13145
|
||||||
|
protocol: TCP
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 99m
|
||||||
|
memory: 65Mi
|
||||||
|
env:
|
||||||
|
- name: TZ
|
||||||
|
value: "Asia/Shanghai"
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: $APP_NAME
|
||||||
|
name: $APP_NAME
|
||||||
|
namespace: dl-proj
|
||||||
|
spec:
|
||||||
|
type: NodePort
|
||||||
|
externalTrafficPolicy: Local
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
protocol: TCP
|
||||||
|
port: 13145
|
||||||
|
nodePort: 13145
|
||||||
|
selector:
|
||||||
|
app: $APP_NAME
|
||||||
115
pom.xml
115
pom.xml
@@ -5,24 +5,38 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<version>3.1.5</version>
|
<version>4.0.1</version>
|
||||||
<relativePath/> <!-- lookup parent from repository -->
|
<relativePath/> <!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
|
<url/>
|
||||||
|
<licenses>
|
||||||
|
<license/>
|
||||||
|
</licenses>
|
||||||
|
<developers>
|
||||||
|
<developer/>
|
||||||
|
</developers>
|
||||||
|
<scm>
|
||||||
|
<connection/>
|
||||||
|
<developerConnection/>
|
||||||
|
<tag/>
|
||||||
|
<url/>
|
||||||
|
</scm>
|
||||||
<groupId>com.bamanker</groupId>
|
<groupId>com.bamanker</groupId>
|
||||||
<artifactId>dailylove</artifactId>
|
<artifactId>dailylove</artifactId>
|
||||||
<version>v2.1-local</version>
|
<version>v2.4.0-native</version>
|
||||||
<name>dailyLove</name>
|
<name>dailylove</name>
|
||||||
<description>dailylove</description>
|
<description>dailylove-forK8S</description>
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
<java.version>17</java.version>
|
<java.version>25</java.version>
|
||||||
<maven.compiler.source>17</maven.compiler.source>
|
<maven.compiler.source>25</maven.compiler.source>
|
||||||
<maven.compiler.target>17</maven.compiler.target>
|
<maven.compiler.target>25</maven.compiler.target>
|
||||||
<fastjson.version>2.0.25</fastjson.version>
|
<fastjson.version>2.0.60</fastjson.version>
|
||||||
<openfeign.version>4.0.4</openfeign.version>
|
<openfeign.version>5.0.0</openfeign.version>
|
||||||
<hutool.version>5.8.18</hutool.version>
|
<hutool.version>5.8.25</hutool.version>
|
||||||
<docker.private.repository>172.17.0.1:10888/my_work</docker.private.repository>
|
<docker.private.repository>registry.cn-chengdu.aliyuncs.com/bamanker</docker.private.repository>
|
||||||
|
<!-- <docker.private.repository>172.17.0.1:10888/my_work</docker.private.repository>-->
|
||||||
</properties>
|
</properties>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -30,9 +44,16 @@
|
|||||||
<artifactId>hutool-core</artifactId>
|
<artifactId>hutool-core</artifactId>
|
||||||
<version>${hutool.version}</version>
|
<version>${hutool.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-devtools</artifactId>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
<artifactId>lombok</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
@@ -63,26 +84,34 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
|
<finalName>dailylove</finalName>
|
||||||
|
<!--指定filtering=true.maven的占位符解析表达式就可以用于它里面的文件-->
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.graalvm.buildtools</groupId>
|
<groupId>org.graalvm.buildtools</groupId>
|
||||||
<artifactId>native-maven-plugin</artifactId>
|
<artifactId>native-maven-plugin</artifactId>
|
||||||
<version>0.9.27</version>
|
|
||||||
<!--为本机映像程序添加配置,生成的配置文件位于
|
<!--为本机映像程序添加配置,生成的配置文件位于
|
||||||
META-INF/native-image/groupID/artifactID/native-image.properties
|
META-INF/native-image/groupID/artifactID/native-image.properties
|
||||||
也可以手动配置-->
|
也可以手动配置-->
|
||||||
<configuration>
|
<configuration>
|
||||||
|
<mainClass>com.bamanker.dailylove.DailyLoveApplication</mainClass>
|
||||||
<buildArgs>
|
<buildArgs>
|
||||||
<!--开启dashboard-->
|
<!--开启dashboard-->
|
||||||
<!-- <arg>-H:DashboardDump=dailylove -H:+DashboardAll</arg>-->
|
<!-- <arg>-H:DashboardDump=dailylove -H:+DashboardAll</arg>-->
|
||||||
<arg->-H:+ReportExceptionStackTraces</arg->
|
<arg->-H:+ReportExceptionStackTraces</arg->
|
||||||
<!--开启JFR-->
|
<!--开启JFR-->
|
||||||
<arg>--enable-monitoring=jfr</arg>
|
<arg>--enable-monitoring=jfr</arg>
|
||||||
<arg>--gc=G1</arg>
|
<!-- <arg>--gc=G1</arg>-->
|
||||||
<!-- <arg>--pgo</arg>-->
|
<!-- <arg>--pgo</arg>-->
|
||||||
<arg>-Ob</arg>
|
<arg>-Ob</arg>
|
||||||
<!-- <arg>-march=native</arg>-->
|
<!-- <arg>-march=native</arg>-->
|
||||||
<arg>-H:+BuildReport</arg>
|
<!-- <arg>-H:+BuildReport</arg>-->
|
||||||
</buildArgs>
|
</buildArgs>
|
||||||
<!--启动详细输出-->
|
<!--启动详细输出-->
|
||||||
<verbose>true</verbose>
|
<verbose>true</verbose>
|
||||||
@@ -96,34 +125,40 @@
|
|||||||
</options>
|
</options>
|
||||||
</agent>-->
|
</agent>-->
|
||||||
</configuration>
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<!--支持yaml读取pom的参数-->
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
<delimiters>
|
||||||
|
<delimiter>@</delimiter>
|
||||||
|
</delimiters>
|
||||||
|
<useDefaultDelimiters>false</useDefaultDelimiters>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<release>25</release>
|
||||||
|
<annotationProcessors>
|
||||||
|
<annotationProcessor>lombok.launch.AnnotationProcessorHider$AnnotationProcessor
|
||||||
|
</annotationProcessor>
|
||||||
|
</annotationProcessors>
|
||||||
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>com.xenoamess.docker</groupId>
|
|
||||||
<artifactId>dockerfile-maven-plugin</artifactId>
|
|
||||||
<version>1.5.0</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>default</id>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>build</goal>
|
|
||||||
<goal>push</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
<configuration>
|
<configuration>
|
||||||
<username>bamanker</username>
|
<excludes>
|
||||||
<password>Fz8803101</password>
|
<exclude>
|
||||||
<repository>${docker.private.repository}/${project.artifactId}</repository>
|
<groupId>org.projectlombok</groupId>
|
||||||
<tag>${project.version}</tag>
|
<artifactId>lombok</artifactId>
|
||||||
<buildArgs>
|
</exclude>
|
||||||
<NATIVE_FILE>${project.artifactId}</NATIVE_FILE>
|
</excludes>
|
||||||
</buildArgs>
|
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ public class ClassReflectConfig {
|
|||||||
begin = false;
|
begin = false;
|
||||||
executorService.submit(() -> {
|
executorService.submit(() -> {
|
||||||
|
|
||||||
|
|
||||||
// {
|
// {
|
||||||
// // 先抓取上一次的文件,生成
|
// // 先抓取上一次的文件,生成
|
||||||
// try {
|
// try {
|
||||||
|
|||||||
@@ -10,9 +10,18 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
public class TestController {
|
public class TestController {
|
||||||
|
/**
|
||||||
|
* 处理GET请求的测试方法。
|
||||||
|
*
|
||||||
|
* @return 返回一个字符串,内容为"test ok!!!!!!!!",用于验证功能的正常运行。
|
||||||
|
*/
|
||||||
|
|
||||||
@GetMapping("/test")
|
@GetMapping("/test")
|
||||||
public String test(){
|
public String test(){
|
||||||
return "test ok!!!!!!!!";
|
return "test ok!!!!!!!!";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ import lombok.AllArgsConstructor;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author bamanker
|
||||||
|
*/
|
||||||
@Data
|
@Data
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@@ -11,4 +14,8 @@ public class DataItem {
|
|||||||
private String value;
|
private String value;
|
||||||
private String color;
|
private String color;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
target/dailylove
BIN
target/dailylove
Binary file not shown.
Reference in New Issue
Block a user