-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
499ecc1
commit b696d31
Showing
78 changed files
with
3,749 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
FROM amazoncorretto:17 | ||
FROM amazoncorretto:21 | ||
MAINTAINER xiaowoniu | ||
|
||
ADD ./target/snail-job-example.jar snail-job-example.jar | ||
ADD ./target/example.jar example.jar | ||
|
||
#对外暴漏的端口号 | ||
EXPOSE 8018 | ||
|
||
WORKDIR / | ||
|
||
#开机启动 | ||
ENTRYPOINT ["sh","-c","java -jar $JAVA_OPTS /snail-job-example.jar $PARAMS"] | ||
ENTRYPOINT ["sh","-c","java -jar $JAVA_OPTS /example.jar $PARAMS"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
CurrentDir=$(dirname $0) | ||
|
||
find ${CurrentDir} -name "target" | xargs rm -rf $(xargs) | ||
mvn clean package -DskipTests=true | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
CurrentDir=$(dirname $0) | ||
|
||
find ${CurrentDir} -name "target" | xargs rm -rf $(xargs) | ||
mvn clean package | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.example; | ||
|
||
import com.aizuda.snailjob.client.starter.EnableSnailJob; | ||
import org.mybatis.spring.annotation.MapperScan; | ||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
|
||
import java.util.TimeZone; | ||
|
||
@SpringBootApplication | ||
@EnableSnailJob | ||
@MapperScan("com.example.dao") | ||
public class ExampleApplication { | ||
public static void main(String[] args) { | ||
TimeZone.setDefault(TimeZone.getTimeZone("Asia/Shanghai")); | ||
SpringApplication.run(ExampleApplication.class, args); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.example.bo; | ||
|
||
import com.alibaba.excel.annotation.ExcelProperty; | ||
import lombok.Data; | ||
|
||
/** | ||
* excel表格手机号BO | ||
* | ||
* @author JiChenWang | ||
* @since 2024/6/27 20:28 | ||
*/ | ||
@Data | ||
public class PhoneNumberBo { | ||
|
||
@ExcelProperty(value = "手机号码", index = 0) | ||
private String phoneNumber; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package com.example.bo; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
/** | ||
* 手机号检测BO | ||
* | ||
* @author JiChenWang | ||
* @since 2024/6/27 20:50 | ||
*/ | ||
@Data | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class PhoneNumberCheckBo { | ||
|
||
@Schema(description = "检测总条数", accessMode = Schema.AccessMode.READ_WRITE) | ||
private Long total = 0L; | ||
|
||
@Schema(description = "检测失败条数", accessMode = Schema.AccessMode.READ_WRITE) | ||
private Long error = 0L; | ||
|
||
@Schema(description = "检测成功条数", accessMode = Schema.AccessMode.READ_WRITE) | ||
private Long success = 0L; | ||
|
||
@Schema(description = "检测失败临时的数据", accessMode = Schema.AccessMode.READ_WRITE) | ||
private List<String> checkErrors = new ArrayList<>(); | ||
|
||
// @Schema(description = "检测成功临时的数据", accessMode = Schema.AccessMode.READ_WRITE) | ||
// private List<PhoneNumberPo> checkSuccessPhoneNumberList = new ArrayList<>(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package com.example.config; | ||
|
||
import com.aizuda.snailjob.common.core.util.SnailJobVersion; | ||
import io.swagger.v3.oas.models.ExternalDocumentation; | ||
import io.swagger.v3.oas.models.OpenAPI; | ||
import io.swagger.v3.oas.models.info.Info; | ||
import io.swagger.v3.oas.models.info.License; | ||
import org.springdoc.core.models.GroupedOpenApi; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
|
||
/** | ||
* @author: www.byteblogs.com | ||
* @date : 2023-07-17 18:19 | ||
* @since 2.1.0 | ||
*/ | ||
@Configuration | ||
public class SwaggerConfig { | ||
|
||
@Bean | ||
public OpenAPI springShopOpenAPI() { | ||
return new OpenAPI() | ||
.info(new Info() | ||
.title("Snail Job Example") | ||
.description("<h1>SnailJob是一个灵活,可靠和快速的分布式任务重试和分布式任务调度平台</h1> \n" + | ||
"<h3>官网地址: https://snailjob.opensnail.com/</h3>" + | ||
"<h3>在线体验地址: https://preview.snailjob.opensnail.com/</h3> " + | ||
"<h3>源码地址: https://gitee.com/opensnail/snail-job-demo</h3>" + | ||
"<h3>特别提醒: 🌻在您使用测试案例之前请认真的阅读官网.</h3>") | ||
.version(SnailJobVersion.getVersion()) | ||
.license(new License().name("Apache 2.0").url("https://snailjob.opensnail.com/"))) | ||
.externalDocs(new ExternalDocumentation() | ||
.description("视频教程:以小白视角的SnailJob入门级视频教程") | ||
.url("https://www.bilibili.com/video/BV1pvtBerEmV/?vd_source=ec323e2347232ea82321f54aba036b63")) | ||
; | ||
} | ||
|
||
@Bean | ||
public GroupedOpenApi adminApi() { | ||
return GroupedOpenApi.builder() | ||
//分组名 | ||
.group("user") | ||
.pathsToMatch("/**") | ||
//扫描路径,将路径下有swagger注解的接口解析到文档中 | ||
.packagesToScan("com.example.controller") | ||
.build(); | ||
} | ||
} | ||
|
||
|
||
|
||
|
||
|
||
|
Oops, something went wrong.