diff --git a/eventmesh-dashboard-common/pom.xml b/eventmesh-dashboard-common/pom.xml
index c713c15b..f79bd00c 100644
--- a/eventmesh-dashboard-common/pom.xml
+++ b/eventmesh-dashboard-common/pom.xml
@@ -30,16 +30,4 @@
-
-
-
- org.springframework.boot
- spring-boot-dependencies
- ${spring-boot.version}
- pom
- import
-
-
-
-
\ No newline at end of file
diff --git a/eventmesh-dashboard-console/pom.xml b/eventmesh-dashboard-console/pom.xml
index 4380e6f7..6a4c2ea7 100644
--- a/eventmesh-dashboard-console/pom.xml
+++ b/eventmesh-dashboard-console/pom.xml
@@ -16,10 +16,15 @@
1.8
UTF-8
UTF-8
- 2.7.6
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
org.springdoc
@@ -32,10 +37,16 @@
1.7.0
-
+
+
+ org.apache.eventmesh.dashboard.common
+ eventmesh-dashboard-common
+ 0.0.1-SNAPSHOT
+ compile
+
- org.apache.eventmesh.dashboard.core
- eventmesh-dashboard-core
+ org.apache.eventmesh.dashboard.service
+ eventmesh-dashboard-service
0.0.1-SNAPSHOT
compile
@@ -47,9 +58,8 @@
1.2.21
- com.baomidou
- mybatis-plus-boot-starter
- 3.5.5
+ org.mybatis.spring.boot
+ mybatis-spring-boot-starter
com.mysql
@@ -58,15 +68,4 @@
-
-
-
- org.springframework.boot
- spring-boot-dependencies
- ${spring-boot.version}
- pom
- import
-
-
-
\ No newline at end of file
diff --git a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/EventmeshConsoleApplication.java b/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/EventmeshConsoleApplication.java
index c47e2d0b..b7201f9e 100644
--- a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/EventmeshConsoleApplication.java
+++ b/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/EventmeshConsoleApplication.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package org.apache.eventmesh.dashboard.console;
import lombok.extern.slf4j.Slf4j;
@@ -5,18 +22,16 @@
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
-/**
- * @author lambert
- */
@Slf4j
@SpringBootApplication
-@ComponentScan({"org.apache.eventmesh.dashboard.core"})
+@ComponentScan({"org.apache.eventmesh.dashboard.service"})
public class EventmeshConsoleApplication {
+
public static void main(String[] args) {
- try{
+ try {
SpringApplication.run(EventmeshConsoleApplication.class, args);
- log.info("{} 启动成功",EventmeshConsoleApplication.class.getSimpleName());
- }catch (Exception e){
+ log.info("{} Successfully booted.", EventmeshConsoleApplication.class.getSimpleName());
+ } catch (Exception e) {
log.error(e.getMessage(), e);
}
}
diff --git a/eventmesh-dashboard-console/src/main/resources/application-dev.yml b/eventmesh-dashboard-console/src/main/resources/application-dev.yml
index 2890ce6f..8d04c6c0 100644
--- a/eventmesh-dashboard-console/src/main/resources/application-dev.yml
+++ b/eventmesh-dashboard-console/src/main/resources/application-dev.yml
@@ -29,37 +29,23 @@ spring:
name: eventmesh-console
datasource:
name: eventmesh-console
- url: jdbc:mysql://${EVENTMESH_CONSOLE_DB_HOST}/eventmesh-dashboard?useSSL=false&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&allowPublicKeyRetrieval=true
- username: ${EVENTMESH_CONSOLE_DB_USERNAME}
- password: ${EVENTMESH_CONSOLE_DB_PASSWORD}
- # using druid data source
type: com.alibaba.druid.pool.DruidDataSource
- driver-class-name: com.mysql.cj.jdbc.Driver
- maxActive: 20
- initialSize: 1
- maxWait: 60000
- minIdle: 1
- timeBetweenEvictionRunsMillis: 60000
- minEvictableIdleTimeMillis: 300000
- validationQuery: select 'x'
- testWhileIdle: true
- testOnBorrow: false
- testOnReturn: false
- poolPreparedStatements: true
- maxOpenPreparedStatements: 20
- # encrypt password
- filters: config
+ druid:
+ driver-class-name: com.mysql.cj.jdbc.Driver
+ url: jdbc:mysql://localhost/eventmesh-dashboard?useSSL=false&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&allowPublicKeyRetrieval=true
+ username: root
+ password: root
+
+ initial-size: 1
+ max-active: 50
+ min-idle: 5
+ max-wait: 6000
+ validation-query: select 'x'
+ validation-query-timeout: 15
+ test-on-borrow: false
+ test-while-idle: true
+ min-evictable-idle-time-millis: 300000
-mybatis:
- checkConfig-location: false
- configuration:
- useGeneratedKeys: true
- mapUnderscoreToCamelCase: true
-pagehelper:
- helperDialect: mysql
- reasonable: true
- supportMethodsArguments: true
- params: count=countSql
diff --git a/eventmesh-dashboard-console/src/main/resources/application.yml b/eventmesh-dashboard-console/src/main/resources/application.yml
index 31966822..f39890e9 100644
--- a/eventmesh-dashboard-console/src/main/resources/application.yml
+++ b/eventmesh-dashboard-console/src/main/resources/application.yml
@@ -19,4 +19,20 @@ spring:
application:
name: eventmesh-dashboard
profiles:
- active: dev
\ No newline at end of file
+ active: dev
+
+logging:
+ config: classpath:logback.xml
+
+mybatis:
+ checkConfig-location: false
+ configuration:
+ useGeneratedKeys: true
+ mapUnderscoreToCamelCase: true
+
+
+pagehelper:
+ helperDialect: mysql
+ reasonable: true
+ supportMethodsArguments: true
+ params: count=countSql
\ No newline at end of file
diff --git a/eventmesh-dashboard-console/src/main/resources/logback.xml b/eventmesh-dashboard-console/src/main/resources/logback.xml
new file mode 100644
index 00000000..49d106ec
--- /dev/null
+++ b/eventmesh-dashboard-console/src/main/resources/logback.xml
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+ [%d{yyyy-MM-dd HH:mm:ss.SSS}] %p %t - %m%n
+
+
+
+
+ ${user.home}/logs/eventmesh-dashboard-console.log
+ true
+
+ ${user.home}/logs/eventmesh-dashboard-console-%d{yyyy-MM-dd}.%i.log
+
+
+ 104857600
+
+ 10
+
+
+ [%d{yyyy-MM-dd HH:mm:ss.SSS}] %p %t - %m%n
+ UTF-8
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/controller/ConnectionController.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/controller/ConnectionController.java
similarity index 96%
rename from eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/controller/ConnectionController.java
rename to eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/controller/ConnectionController.java
index f4dea5cf..34037d1d 100644
--- a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/controller/ConnectionController.java
+++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/controller/ConnectionController.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.eventmesh.dashboard.console.controller;
+package org.apache.eventmesh.dashboard.core.controller;
import org.apache.eventmesh.dashboard.core.service.ConnectionService;
diff --git a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/controller/MetricsController.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/controller/MetricsController.java
similarity index 95%
rename from eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/controller/MetricsController.java
rename to eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/controller/MetricsController.java
index 38f5b1af..fbf7dcb9 100644
--- a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/controller/MetricsController.java
+++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/controller/MetricsController.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.eventmesh.dashboard.console.controller;
+package org.apache.eventmesh.dashboard.core.controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
diff --git a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/controller/SubscriptionController.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/controller/SubscriptionController.java
similarity index 98%
rename from eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/controller/SubscriptionController.java
rename to eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/controller/SubscriptionController.java
index c124277f..3b48763a 100644
--- a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/controller/SubscriptionController.java
+++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/controller/SubscriptionController.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.eventmesh.dashboard.console.controller;
+package org.apache.eventmesh.dashboard.core.controller;
import org.apache.eventmesh.dashboard.core.dto.Result;
import org.apache.eventmesh.dashboard.core.model.SubscriptionInfo;
diff --git a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/controller/TopicController.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/controller/TopicController.java
similarity index 98%
rename from eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/controller/TopicController.java
rename to eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/controller/TopicController.java
index a367dfdf..f95ffbbe 100644
--- a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/controller/TopicController.java
+++ b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/controller/TopicController.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.eventmesh.dashboard.console.controller;
+package org.apache.eventmesh.dashboard.core.controller;
import org.apache.eventmesh.dashboard.core.dto.CreateTopicRequest;
import org.apache.eventmesh.dashboard.core.dto.DeleteTopicRequest;
diff --git a/pom.xml b/pom.xml
index 3abf4205..cc985a7e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -78,6 +78,8 @@
8
8
UTF-8
+ 2.7.6
+ 2.1.4
@@ -87,4 +89,20 @@
eventmesh-dashboard-service
eventmesh-dashboard-common
+
+
+
+ org.springframework.boot
+ spring-boot-dependencies
+ ${spring-boot.version}
+ pom
+ import
+
+
+ org.mybatis.spring.boot
+ mybatis-spring-boot-starter
+ ${mybatis-spring-boot.version}
+
+
+
\ No newline at end of file