From cd89f79bb3405620788ed8cc6824100ae1ce20ba Mon Sep 17 00:00:00 2001 From: caokhang91 Date: Sat, 6 May 2023 20:12:50 +0700 Subject: [PATCH 1/4] test build --- build.gradle | 1 - .../src/test/java/org/maxkey/otp/algorithm/RQcodeTest.java | 7 ++----- .../java/org/gateway/controller/FallbackController.java | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index 0e939cfbb..ec75ef782 100644 --- a/build.gradle +++ b/build.gradle @@ -80,7 +80,6 @@ allprojects { compileJava.options.encoding = 'UTF-8' eclipse { - /*设置工程字符集*/ jdt { File prefs = file('.settings/org.eclipse.core.resources.prefs') if (prefs.exists()) { diff --git a/maxkey-common/src/test/java/org/maxkey/otp/algorithm/RQcodeTest.java b/maxkey-common/src/test/java/org/maxkey/otp/algorithm/RQcodeTest.java index 261f2a04e..dcb218a4a 100644 --- a/maxkey-common/src/test/java/org/maxkey/otp/algorithm/RQcodeTest.java +++ b/maxkey-common/src/test/java/org/maxkey/otp/algorithm/RQcodeTest.java @@ -64,8 +64,7 @@ EMAIL:forrestgump@example.com REV:20080424T195243Z END:VCARD */ - // 编码 - public static void main(String[] args) { + public static void main(String[] args) { try { String str = "BEGIN:VCARD\n" + @@ -79,7 +78,6 @@ END:VCARD "Connsec\n" + "TITLE:技术总监\n" + //"URL:http://blog.csdn.net/lidew521\n" + - //"NOTE:呼呼测试下吧。。。\n" + "END:VCARD"; String str1 = "BEGIN:VCARD\n" + @@ -96,8 +94,7 @@ END:VCARD "END:VCARD\n" ; System.out.println(str); - //String str = "CN:男;COP:公司;ZW:职务";// 二维码内容 - String path = "D:\\hwy.png"; + String path = "D:\\hwy.png"; BitMatrix byteMatrix; byteMatrix = new MultiFormatWriter().encode(new String(str1.getBytes("UTF-8"),"iso-8859-1"), BarcodeFormat.QR_CODE, 300, 300); diff --git a/maxkey-webs/maxkey-gataway/src/main/java/org/gateway/controller/FallbackController.java b/maxkey-webs/maxkey-gataway/src/main/java/org/gateway/controller/FallbackController.java index f82e55676..4c08cbf60 100644 --- a/maxkey-webs/maxkey-gataway/src/main/java/org/gateway/controller/FallbackController.java +++ b/maxkey-webs/maxkey-gataway/src/main/java/org/gateway/controller/FallbackController.java @@ -29,7 +29,7 @@ public class FallbackController { public Map defaultFallback() { Map map = new HashMap<>(); map.put("code", 1); - map.put("message", "服务异常"); + map.put("message", "Successful"); return map; } } From 1ebe6aff847b3fa7c341c2de00b2d86511c18369 Mon Sep 17 00:00:00 2001 From: caokhang91 Date: Sat, 6 May 2023 20:12:50 +0700 Subject: [PATCH 2/4] test build --- build.gradle | 1 - .../src/test/java/org/maxkey/otp/algorithm/RQcodeTest.java | 7 ++----- .../java/org/gateway/controller/FallbackController.java | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index 0e939cfbb..ec75ef782 100644 --- a/build.gradle +++ b/build.gradle @@ -80,7 +80,6 @@ allprojects { compileJava.options.encoding = 'UTF-8' eclipse { - /*设置工程字符集*/ jdt { File prefs = file('.settings/org.eclipse.core.resources.prefs') if (prefs.exists()) { diff --git a/maxkey-common/src/test/java/org/maxkey/otp/algorithm/RQcodeTest.java b/maxkey-common/src/test/java/org/maxkey/otp/algorithm/RQcodeTest.java index 261f2a04e..dcb218a4a 100644 --- a/maxkey-common/src/test/java/org/maxkey/otp/algorithm/RQcodeTest.java +++ b/maxkey-common/src/test/java/org/maxkey/otp/algorithm/RQcodeTest.java @@ -64,8 +64,7 @@ EMAIL:forrestgump@example.com REV:20080424T195243Z END:VCARD */ - // 编码 - public static void main(String[] args) { + public static void main(String[] args) { try { String str = "BEGIN:VCARD\n" + @@ -79,7 +78,6 @@ END:VCARD "Connsec\n" + "TITLE:技术总监\n" + //"URL:http://blog.csdn.net/lidew521\n" + - //"NOTE:呼呼测试下吧。。。\n" + "END:VCARD"; String str1 = "BEGIN:VCARD\n" + @@ -96,8 +94,7 @@ END:VCARD "END:VCARD\n" ; System.out.println(str); - //String str = "CN:男;COP:公司;ZW:职务";// 二维码内容 - String path = "D:\\hwy.png"; + String path = "D:\\hwy.png"; BitMatrix byteMatrix; byteMatrix = new MultiFormatWriter().encode(new String(str1.getBytes("UTF-8"),"iso-8859-1"), BarcodeFormat.QR_CODE, 300, 300); diff --git a/maxkey-webs/maxkey-gataway/src/main/java/org/gateway/controller/FallbackController.java b/maxkey-webs/maxkey-gataway/src/main/java/org/gateway/controller/FallbackController.java index f82e55676..4c08cbf60 100644 --- a/maxkey-webs/maxkey-gataway/src/main/java/org/gateway/controller/FallbackController.java +++ b/maxkey-webs/maxkey-gataway/src/main/java/org/gateway/controller/FallbackController.java @@ -29,7 +29,7 @@ public class FallbackController { public Map defaultFallback() { Map map = new HashMap<>(); map.put("code", 1); - map.put("message", "服务异常"); + map.put("message", "Successful"); return map; } } From 743f3a44c11d41dc1e67a9a459c09907b5a71683 Mon Sep 17 00:00:00 2001 From: Khang Doan Cao Date: Sat, 21 Sep 2024 17:54:33 +0700 Subject: [PATCH 3/4] CircleCI Commit --- .circleci/config.yml | 82 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000..25a7606b0 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,82 @@ +# This config was automatically generated from your source code +# Stacks detected: deps:java:.,deps:node:maxkey-web-frontend/maxkey-web-app,tool:gradle: +version: 2.1 +orbs: + node: circleci/node@5 +jobs: + test-node: + # Install node dependencies and run tests + executor: node/default + working_directory: ~/project/maxkey-web-frontend/maxkey-web-app + steps: + - checkout: + path: ~/project + - node/install-packages: + pkg-manager: npm + - run: + name: Run tests + command: npm test --passWithNoTests + build-node: + # Build node project + executor: node/default + working_directory: ~/project/maxkey-web-frontend/maxkey-web-app + steps: + - checkout: + path: ~/project + - node/install-packages: + pkg-manager: npm + - run: + command: npm run build + - run: + name: Create the ~/artifacts directory if it doesn't exist + command: mkdir -p ~/artifacts + # Copy output to artifacts dir + - run: + name: Copy artifacts + command: cp -R build dist public .output .next .docusaurus ~/artifacts 2>/dev/null || true + - store_artifacts: + path: ~/artifacts + destination: node-build + test-java: + docker: + - image: cimg/openjdk:17.0 + steps: + - checkout + - run: + name: Calculate cache key + command: |- + find . -name 'pom.xml' -o -name 'gradlew*' -o -name '*.gradle*' | \ + sort | xargs cat > /tmp/CIRCLECI_CACHE_KEY + - restore_cache: + key: cache-{{ checksum "/tmp/CIRCLECI_CACHE_KEY" }} + - run: + command: ./gradlew check + - store_test_results: + path: build/test-results + - save_cache: + key: cache-{{ checksum "/tmp/CIRCLECI_CACHE_KEY" }} + paths: + - ~/.gradle/caches + - store_artifacts: + path: build/reports + deploy: + # This is an example deploy job, not actually used by the workflow + docker: + - image: cimg/base:stable + steps: + # Replace this with steps to deploy to users + - run: + name: deploy + command: '#e.g. ./deploy.sh' +workflows: + build-and-test: + jobs: + - test-node + - build-node: + requires: + - test-node + - test-java + - test-java + # - deploy: + # requires: + # - build-node From e82e92abb95f9d902d79b0f37190c224271762e6 Mon Sep 17 00:00:00 2001 From: MaxKey Date: Thu, 3 Oct 2024 18:36:38 +0800 Subject: [PATCH 4/4] Revert "test build" This reverts commit 1ebe6aff847b3fa7c341c2de00b2d86511c18369. --- build.gradle | 1 + .../src/test/java/org/maxkey/otp/algorithm/RQcodeTest.java | 7 +++++-- .../java/org/gateway/controller/FallbackController.java | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index ec75ef782..0e939cfbb 100644 --- a/build.gradle +++ b/build.gradle @@ -80,6 +80,7 @@ allprojects { compileJava.options.encoding = 'UTF-8' eclipse { + /*设置工程字符集*/ jdt { File prefs = file('.settings/org.eclipse.core.resources.prefs') if (prefs.exists()) { diff --git a/maxkey-common/src/test/java/org/maxkey/otp/algorithm/RQcodeTest.java b/maxkey-common/src/test/java/org/maxkey/otp/algorithm/RQcodeTest.java index dcb218a4a..261f2a04e 100644 --- a/maxkey-common/src/test/java/org/maxkey/otp/algorithm/RQcodeTest.java +++ b/maxkey-common/src/test/java/org/maxkey/otp/algorithm/RQcodeTest.java @@ -64,7 +64,8 @@ EMAIL:forrestgump@example.com REV:20080424T195243Z END:VCARD */ - public static void main(String[] args) { + // 编码 + public static void main(String[] args) { try { String str = "BEGIN:VCARD\n" + @@ -78,6 +79,7 @@ END:VCARD "Connsec\n" + "TITLE:技术总监\n" + //"URL:http://blog.csdn.net/lidew521\n" + + //"NOTE:呼呼测试下吧。。。\n" + "END:VCARD"; String str1 = "BEGIN:VCARD\n" + @@ -94,7 +96,8 @@ END:VCARD "END:VCARD\n" ; System.out.println(str); - String path = "D:\\hwy.png"; + //String str = "CN:男;COP:公司;ZW:职务";// 二维码内容 + String path = "D:\\hwy.png"; BitMatrix byteMatrix; byteMatrix = new MultiFormatWriter().encode(new String(str1.getBytes("UTF-8"),"iso-8859-1"), BarcodeFormat.QR_CODE, 300, 300); diff --git a/maxkey-webs/maxkey-gataway/src/main/java/org/gateway/controller/FallbackController.java b/maxkey-webs/maxkey-gataway/src/main/java/org/gateway/controller/FallbackController.java index 4c08cbf60..f82e55676 100644 --- a/maxkey-webs/maxkey-gataway/src/main/java/org/gateway/controller/FallbackController.java +++ b/maxkey-webs/maxkey-gataway/src/main/java/org/gateway/controller/FallbackController.java @@ -29,7 +29,7 @@ public class FallbackController { public Map defaultFallback() { Map map = new HashMap<>(); map.put("code", 1); - map.put("message", "Successful"); + map.put("message", "服务异常"); return map; } }