From 5c30a732f8cba68d0b15e2626aca8ac24a768f57 Mon Sep 17 00:00:00 2001 From: Arthur Ming Date: Mon, 10 Apr 2023 07:48:10 +0800 Subject: [PATCH] feat: use dashboard layout (#72) * feat: imporve logger based on logback * feat: add error props source class * feat: add golabl expcetion handler * feat: add api logger * build: upgrade spring boot 2.4.0 * build: add gradle building way * build(gradle): set main class using gradle plugins * build: remove .gradle folder --- .gitignore | 1 + gradlew | 4 +- pom.xml | 108 ++++++++++++++++++ .../jobs/api/controller/JobController.java | 9 +- src/main/resources/logback-spring.xml | 5 + 5 files changed, 124 insertions(+), 3 deletions(-) create mode 100644 pom.xml diff --git a/.gitignore b/.gitignore index e001502..2fae08d 100644 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,7 @@ build/ .vscode/ ### Others ### +bin/ out/ src/main/resources/static logs diff --git a/gradlew b/gradlew index a69d9cb..6253f7b 100755 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ -#!/bin/sh +#!/usr/bin/env sh # -# Copyright © 2015-2021 the original authors. +# Copyright 2015 the original author or authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..98ee863 --- /dev/null +++ b/pom.xml @@ -0,0 +1,108 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + + 2.4.0 + + + org.daming + jobs + 0.0.1-SNAPSHOT + jobs + Demo project for Spring Boot + + + 14 + + + + + org.springframework.boot + spring-boot-starter + + + org.springframework.boot + spring-boot-starter-jdbc + + + org.springframework.boot + spring-boot-starter-quartz + + + org.springframework.boot + spring-boot-starter-aop + + + io.springfox + springfox-boot-starter + 3.0.0 + + + + org.postgresql + postgresql + + + org.flywaydb + flyway-core + + + io.jsonwebtoken + jjwt + 0.9.1 + + + + org.springframework.boot + spring-boot-devtools + runtime + true + + + org.springframework.boot + spring-boot-starter-test + test + + + org.junit.vintage + junit-vintage-engine + + + + + org.springframework.boot + spring-boot-starter-web + compile + + + + + alimaven spring plugin + alimaven spring plugin + https://maven.aliyun.com/repository/spring-plugin + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + org.flywaydb + flyway-maven-plugin + 7.0.2 + + jdbc:postgresql://127.0.0.1:5432/postgres + postgres + 12345 + + + + + + diff --git a/src/main/java/org/daming/jobs/api/controller/JobController.java b/src/main/java/org/daming/jobs/api/controller/JobController.java index 87acd2f..0d3fc6b 100644 --- a/src/main/java/org/daming/jobs/api/controller/JobController.java +++ b/src/main/java/org/daming/jobs/api/controller/JobController.java @@ -9,7 +9,14 @@ import org.daming.jobs.service.IQuartzService; import org.quartz.SchedulerException; import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; import java.util.List; import java.util.Optional; diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml index bbf71e2..c7e3867 100644 --- a/src/main/resources/logback-spring.xml +++ b/src/main/resources/logback-spring.xml @@ -96,6 +96,11 @@ + + + + +