-
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.
* build: add bazel support * ci: typo fix * build: remove useless deps * build: add bazelrc file * ci: bazel java language version 11 * feat: add bazel support
- Loading branch information
1 parent
7cdc01d
commit fe45cc2
Showing
70 changed files
with
608 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
build --java_language_version=17 |
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,2 @@ | ||
build --define=ABSOLUTE_JAVABASE='C:\Program Files\Java\jdk-17' | ||
server --server_javabase='C:\Program Files\Java\jdk-17' |
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
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,78 @@ | ||
load("@rules_java//java:defs.bzl", "java_binary", "java_library", "java_test") | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
java_library( | ||
name = "java-maven-lib", | ||
srcs = glob([ | ||
"src/main/java/org/daming/jobs/api/advice/*.java", | ||
"src/main/java/org/daming/jobs/api/controller/*.java", | ||
"src/main/java/org/daming/jobs/api/interceptor/*.java", | ||
"src/main/java/org/daming/jobs/base/*.java", | ||
"src/main/java/org/daming/jobs/base/**/*.java", | ||
"src/main/java/org/daming/jobs/config/**/*.java", | ||
"src/main/java/org/daming/jobs/pojo/**/*.java", | ||
"src/main/java/org/daming/jobs/security/**/*.java", | ||
"src/main/java/org/daming/jobs/service/**/*.java", | ||
"src/main/java/org/daming/jobs/task/**/*.java", | ||
]), | ||
resources = glob(["src/main/resources/**"]), | ||
deps = [ | ||
"@maven//:org_springframework_boot_spring_boot_starter_web", | ||
"@maven//:org_springframework_boot_spring_boot_starter_jdbc", | ||
"@maven//:org_springframework_boot_spring_boot_starter_quartz", | ||
"@maven//:org_springframework_boot_spring_boot_starter_aop", | ||
|
||
"@maven//:io_springfox_springfox_boot_starter", | ||
"@maven//:io_springfox_springfox_core", | ||
"@maven//:io_springfox_springfox_spi", | ||
"@maven//:io_springfox_springfox_spring_web", | ||
"@maven//:io_swagger_swagger_annotations", | ||
|
||
"@maven//:com_auth0_java_jwt", | ||
"@maven//:org_postgresql_postgresql", | ||
"@maven//:org_springframework_boot_spring_boot_devtools", | ||
|
||
"@maven//:org_springframework_boot_spring_boot", | ||
"@maven//:org_springframework_boot_spring_boot_autoconfigure", | ||
"@maven//:org_springframework_spring_aop", | ||
"@maven//:org_springframework_spring_beans", | ||
"@maven//:org_springframework_spring_core", | ||
"@maven//:org_springframework_spring_context", | ||
"@maven//:org_springframework_spring_web", | ||
|
||
"@maven//:org_apache_shiro_shiro_spring_boot_starter", | ||
"@maven//:org_apache_shiro_shiro_core", | ||
"@maven//:org_apache_shiro_shiro_spring", | ||
"@maven//:org_apache_shiro_shiro_web", | ||
|
||
"@maven//:org_slf4j_slf4j_api", | ||
|
||
"@maven//:org_quartz_scheduler_quartz", | ||
|
||
"@maven//:org_aspectj_aspectjweaver", | ||
|
||
"@maven//:org_apache_tomcat_embed_tomcat_embed_core", | ||
"@maven//:jakarta_annotation_jakarta_annotation_api", | ||
"@maven//:jakarta_xml_bind_jakarta_xml_bind_api", | ||
"@maven//:com_fasterxml_jackson_core_jackson_core", | ||
"@maven//:com_fasterxml_jackson_core_jackson_databind" | ||
], | ||
) | ||
|
||
java_binary( | ||
name = "java-maven", | ||
main_class = "org.daming.jobs.JobsApplication", | ||
runtime_deps = [":java-maven-lib"], | ||
) | ||
|
||
# java_test( | ||
# name = "tests", | ||
# srcs = glob(["src/test/java/com/example/myproject/*.java"]), | ||
# test_class = "com.example.myproject.TestApp", | ||
# deps = [ | ||
# ":java-maven-lib", | ||
# "@maven//:com_google_guava_guava", | ||
# "@maven//:junit_junit", | ||
# ], | ||
# ) |
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,51 @@ | ||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | ||
|
||
RULES_JVM_EXTERNAL_TAG = "4.2" | ||
RULES_JVM_EXTERNAL_SHA = "cd1a77b7b02e8e008439ca76fd34f5b07aecb8c752961f9640dea15e9e5ba1ca" | ||
|
||
http_archive( | ||
name = "rules_jvm_external", | ||
strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG, | ||
sha256 = RULES_JVM_EXTERNAL_SHA, | ||
urls = [ | ||
"https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG, | ||
"https://ghproxy.com/https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG, | ||
] | ||
|
||
) | ||
|
||
load("@rules_jvm_external//:repositories.bzl", "rules_jvm_external_deps") | ||
|
||
rules_jvm_external_deps() | ||
|
||
load("@rules_jvm_external//:setup.bzl", "rules_jvm_external_setup") | ||
|
||
# rules_jvm_external_setup() | ||
|
||
load("@rules_jvm_external//:defs.bzl", "maven_install") | ||
|
||
maven_install( | ||
artifacts = [ | ||
"org.springframework.boot:spring-boot-starter-web:2.7.2", | ||
"org.springframework.boot:spring-boot-starter-jdbc:2.7.2", | ||
"org.springframework.boot:spring-boot-starter-quartz:2.7.2", | ||
"org.springframework.boot:spring-boot-starter-aop:2.7.2", | ||
|
||
"io.springfox:springfox-boot-starter:3.0.0", | ||
"org.apache.shiro:shiro-spring-boot-starter:1.9.1", | ||
"com.auth0:java-jwt:3.18.2", | ||
"org.postgresql:postgresql:42.4.0", | ||
|
||
"org.springframework.boot:spring-boot-devtools:2.7.2", | ||
"org.springframework.boot:spring-boot-starter-test:2.7.2" | ||
|
||
], | ||
fetch_sources = True, | ||
repositories = [ | ||
"https://maven.aliyun.com/repository/public/", | ||
"https://maven.aliyun.com/nexus/content/groups/public/", | ||
"http://uk.maven.org/maven2", | ||
"https://maven.google.com", | ||
"https://repo1.maven.org/maven2", | ||
], | ||
) |
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,48 @@ | ||
server: | ||
port: 8443 | ||
|
||
|
||
#application-description: @project.description@ | ||
# | ||
#application-version: @project.version@ | ||
|
||
spring: | ||
output: | ||
ansi: | ||
enabled: always | ||
quartz: | ||
properties: | ||
org: | ||
quartz: | ||
scheduler: | ||
instanceName: clusteredScheduler | ||
instanceId: AUTO | ||
jobStore: | ||
class: org.springframework.scheduling.quartz.LocalDataSourceJobStore | ||
driverDelegateClass: org.quartz.impl.jdbcjobstore.PostgreSQLDelegate | ||
tablePrefix: QRTZ_ | ||
isClustered: true | ||
clusterCheckinInterval: 10000 | ||
useProperties: false | ||
threadPool: | ||
class: org.quartz.simpl.SimpleThreadPool | ||
threadCount: 10 | ||
threadPriority: 5 | ||
threadsInheritContextClassLoaderOfInitializingThread: true | ||
job-store-type: jdbc | ||
datasource: | ||
url: jdbc:postgresql://127.0.0.1:5432/postgres | ||
username: postgres | ||
password: 123456 | ||
driver-class-name: org.postgresql.Driver | ||
flyway: | ||
baseline-on-migrate: true | ||
mvc: | ||
pathmatch: | ||
matching-strategy: ant_path_matcher | ||
|
||
#TOKEN_TTL | ||
token: | ||
ttl: | ||
accessTokenTTL: 7200000 | ||
refreshTokenTTL: 28800000 |
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,27 @@ | ||
${AnsiColor.BRIGHT_YELLOW} | ||
//////////////////////////////////////////////////////////////////// | ||
// _ooOoo_ // | ||
// o8888888o // | ||
// 88" . "88 // | ||
// (| ^_^ |) // | ||
// O\ = /O // | ||
// ____/`---'\____ // | ||
// .' \\| |// `. // | ||
// / \\||| : |||// \ // | ||
// / _||||| -:- |||||- \ // | ||
// | | \\\ - /// | | // | ||
// | \_| ''\---/'' | | // | ||
// \ .-\__ `-` ___/-. / // | ||
// ___`. .' /--.--\ `. . ___ // | ||
// ."" '< `.___\_<|>_/___.' >'"". // | ||
// | | : `- \`.;`\ _ /`;.`/ - ` : | | // | ||
// \ \ `-. \_ __\ /__ _/ .-` / / // | ||
// ========`-.____`-.___\_____/___.-`____.-'======== // | ||
// `=---=' // | ||
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // | ||
// 佛祖保佑 永不宕机 永无BUG // | ||
//////////////////////////////////////////////////////////////////// | ||
${AnsiColor.BRIGHT_RED} | ||
Application Name: ${application.title} | ||
Application Version: ${application.version}${application.formatted-version} | ||
Spring Boot Version: ${spring-boot.version}${spring-boot.formatted-version} |
Oops, something went wrong.