From f1a6f8120c30b25b1f0e2c5bca529c7eace0a4f3 Mon Sep 17 00:00:00 2001
From: xuxueli <931591021@qq.com>
Date: Thu, 23 May 2019 15:34:22 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9EJboot=E6=89=A7=E8=A1=8C?=
=?UTF-8?q?=E5=99=A8Sample=E7=A4=BA=E4=BE=8B=E9=A1=B9=E7=9B=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../resources/xxl-job-executor.properties | 2 +-
.../xxl-job-executor-sample-jboot/pom.xml | 102 ++----------
.../{ => executor/sample/jboot}/JbootApp.java | 4 +-
.../sample/jboot/config/JbootConfig.java | 4 -
.../jboot/controller/IndexController.java | 5 +-
.../src/main/resources/jboot.properties | 4 +-
.../src/main/resources/logback.xml | 154 ++----------------
.../src/test/java/com/xuxueli/AppTest.java | 12 +-
8 files changed, 42 insertions(+), 245 deletions(-)
rename xxl-job-executor-samples/xxl-job-executor-sample-jboot/src/main/java/com/xuxueli/{ => executor/sample/jboot}/JbootApp.java (74%)
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-frameless/src/main/resources/xxl-job-executor.properties b/xxl-job-executor-samples/xxl-job-executor-sample-frameless/src/main/resources/xxl-job-executor.properties
index 4ae21c77..70647faf 100644
--- a/xxl-job-executor-samples/xxl-job-executor-sample-frameless/src/main/resources/xxl-job-executor.properties
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-frameless/src/main/resources/xxl-job-executor.properties
@@ -4,7 +4,7 @@ xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job executor address
xxl.job.executor.appname=xxl-job-executor-sample
xxl.job.executor.ip=
-xxl.job.executor.port=9995
+xxl.job.executor.port=9994
### xxl-job, access token
xxl.job.accessToken=
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-jboot/pom.xml b/xxl-job-executor-samples/xxl-job-executor-sample-jboot/pom.xml
index f75734f5..82dc8202 100644
--- a/xxl-job-executor-samples/xxl-job-executor-sample-jboot/pom.xml
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-jboot/pom.xml
@@ -1,33 +1,27 @@
-
-
- xxl-job-executor-samples
com.xuxueli
+ xxl-job-executor-samples
2.1.0-SNAPSHOT
4.0.0
-
xxl-job-executor-sample-jboot
-
- ${project.artifactId}
- Example executor project for spring boot.
- http://www.xuxueli.com/
+ jar
- UTF-8
- 1.7
- 1.7
+ 1.8
+ 1.8
-
+
- junit
- junit
- 4.11
- test
+ io.jboot
+ jboot
+ 2.0.9
@@ -38,12 +32,12 @@
- io.jboot
- jboot
- 2.0.9
+ junit
+ junit
+ 4.11
+ test
-
ch.qos.logback
logback-core
@@ -58,72 +52,4 @@
-
-
-
-
- src/main/java
-
- **/*.xml
-
- true
-
-
- src/main/resources
-
- **/*
-
- true
-
-
- src/main/webapp
-
- **/
-
- true
-
-
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
-
-
- 1.8
-
-
-
- org.codehaus.mojo
- appassembler-maven-plugin
- 1.10
-
- ${project.build.directory}/app
- lib
- bin
- webRoot
- true
- src/main/resources
- flat
- UTF-8
- logs
- tmp
-
-
-
- io.jboot.Jboot
- jboot
-
- windows
- unix
-
-
-
-
-
-
-
-
-
-
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-jboot/src/main/java/com/xuxueli/JbootApp.java b/xxl-job-executor-samples/xxl-job-executor-sample-jboot/src/main/java/com/xuxueli/executor/sample/jboot/JbootApp.java
similarity index 74%
rename from xxl-job-executor-samples/xxl-job-executor-sample-jboot/src/main/java/com/xuxueli/JbootApp.java
rename to xxl-job-executor-samples/xxl-job-executor-sample-jboot/src/main/java/com/xuxueli/executor/sample/jboot/JbootApp.java
index d4aea99f..79e2b7ac 100644
--- a/xxl-job-executor-samples/xxl-job-executor-sample-jboot/src/main/java/com/xuxueli/JbootApp.java
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-jboot/src/main/java/com/xuxueli/executor/sample/jboot/JbootApp.java
@@ -1,11 +1,9 @@
-package com.xuxueli;
+package com.xuxueli.executor.sample.jboot;
import io.jboot.app.JbootApplication;
/**
* Jboot app
- *
- * @author https://github.com/souvc
*/
public class JbootApp {
public static void main(String[] args) {
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-jboot/src/main/java/com/xuxueli/executor/sample/jboot/config/JbootConfig.java b/xxl-job-executor-samples/xxl-job-executor-sample-jboot/src/main/java/com/xuxueli/executor/sample/jboot/config/JbootConfig.java
index 61fa967c..0f58c348 100644
--- a/xxl-job-executor-samples/xxl-job-executor-sample-jboot/src/main/java/com/xuxueli/executor/sample/jboot/config/JbootConfig.java
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-jboot/src/main/java/com/xuxueli/executor/sample/jboot/config/JbootConfig.java
@@ -10,11 +10,7 @@ import io.jboot.core.listener.JbootAppListenerBase;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-/**
- * @author https://github.com/souvc
- */
public class JbootConfig extends JbootAppListenerBase {
-
private Logger logger = LoggerFactory.getLogger(JbootConfig.class);
// ---------------------- xxl-job executor ----------------------
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-jboot/src/main/java/com/xuxueli/executor/sample/jboot/controller/IndexController.java b/xxl-job-executor-samples/xxl-job-executor-sample-jboot/src/main/java/com/xuxueli/executor/sample/jboot/controller/IndexController.java
index 10f219fa..f7a85976 100644
--- a/xxl-job-executor-samples/xxl-job-executor-sample-jboot/src/main/java/com/xuxueli/executor/sample/jboot/controller/IndexController.java
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-jboot/src/main/java/com/xuxueli/executor/sample/jboot/controller/IndexController.java
@@ -3,13 +3,12 @@ package com.xuxueli.executor.sample.jboot.controller;
import io.jboot.web.controller.JbootController;
import io.jboot.web.controller.annotation.RequestMapping;
-/**
- * @author https://github.com/souvc
- */
+
@RequestMapping("/")
public class IndexController extends JbootController {
public void index() {
renderText("xxl job executor running.");
}
+
}
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-jboot/src/main/resources/jboot.properties b/xxl-job-executor-samples/xxl-job-executor-sample-jboot/src/main/resources/jboot.properties
index 3cdf1d53..d625c614 100644
--- a/xxl-job-executor-samples/xxl-job-executor-sample-jboot/src/main/resources/jboot.properties
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-jboot/src/main/resources/jboot.properties
@@ -1,4 +1,4 @@
-#jboot ˿
+#jboot port
undertow.port=8082
@@ -8,7 +8,7 @@ xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job executor address
xxl.job.executor.appname=xxl-job-executor-sample
xxl.job.executor.ip=
-xxl.job.executor.port=9994
+xxl.job.executor.port=9995
### xxl-job, access token
xxl.job.accessToken=
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-jboot/src/main/resources/logback.xml b/xxl-job-executor-samples/xxl-job-executor-sample-jboot/src/main/resources/logback.xml
index f3740648..e5606050 100644
--- a/xxl-job-executor-samples/xxl-job-executor-sample-jboot/src/main/resources/logback.xml
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-jboot/src/main/resources/logback.xml
@@ -1,149 +1,29 @@
+
-
-
-
-
-
-
-
+ logback
+
-
-
-
-
-
-
-
-
-
-
-
-
- %d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %logger - %msg%n
+ %d{HH:mm:ss.SSS} %contextName [%thread] %-5level %logger{36} - %msg%n
+
+
+
+
+ ${log.path}
+
+ ${log.path}.%d{yyyy-MM-dd}.zip
+
+
+ %date %level [%thread] %logger{36} [%file : %line] %msg%n
-
-
-
-
-
-
-
- ERROR
-
- ACCEPT
-
- DENY
-
-
-
-
-
- ${log_dir}/error/%d{yyyy-MM-dd}/logs.log
-
-
- ${maxHistory}
-
-
-
-
- %d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %logger - %msg%n
-
-
-
-
-
-
-
-
-
-
-
- WARN
-
- ACCEPT
-
- DENY
-
-
-
- ${log_dir}/warn/%d{yyyy-MM-dd}/logs.log
- ${maxHistory}
-
-
- %d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %logger - %msg%n
-
-
-
-
-
-
-
- INFO
- ACCEPT
- DENY
-
-
- ${log_dir}/info/%d{yyyy-MM-dd}/logs.log
- ${maxHistory}
-
-
- %d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %logger - %msg%n
-
-
-
-
-
-
-
- DEBUG
- ACCEPT
- DENY
-
-
- ${log_dir}/debug/%d{yyyy-MM-dd}/logs.log
- ${maxHistory}
-
-
- %d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %logger - %msg%n
-
-
-
-
-
-
-
- TRACE
- ACCEPT
- DENY
-
-
- ${log_dir}/trace/%d{yyyy-MM-dd}/logs.log
- ${maxHistory}
-
-
- %d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %logger - %msg%n
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
+
+
\ No newline at end of file
diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-jboot/src/test/java/com/xuxueli/AppTest.java b/xxl-job-executor-samples/xxl-job-executor-sample-jboot/src/test/java/com/xuxueli/AppTest.java
index beff7f60..470feac7 100644
--- a/xxl-job-executor-samples/xxl-job-executor-sample-jboot/src/test/java/com/xuxueli/AppTest.java
+++ b/xxl-job-executor-samples/xxl-job-executor-sample-jboot/src/test/java/com/xuxueli/AppTest.java
@@ -1,20 +1,18 @@
package com.xuxueli;
-import static org.junit.Assert.assertTrue;
-
import org.junit.Test;
+import static org.junit.Assert.assertTrue;
+
/**
* Unit test for simple App.
*/
-public class AppTest
-{
+public class AppTest {
/**
* Rigorous Test :-)
*/
@Test
- public void shouldAnswerWithTrue()
- {
- assertTrue( true );
+ public void shouldAnswerWithTrue() {
+ assertTrue(true);
}
}