Skip to content

Commit

Permalink
implement classes in core are not Service Beans
Browse files Browse the repository at this point in the history
  • Loading branch information
Pil0tXia committed Mar 2, 2024
1 parent e99e903 commit bc51729
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 122 deletions.
5 changes: 0 additions & 5 deletions eventmesh-dashboard-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>

<!-- Utility -->
<dependency>
Expand Down
5 changes: 0 additions & 5 deletions eventmesh-dashboard-console/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@
<artifactId>eventmesh-dashboard-service</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.eventmesh.dashboard.core</groupId>
<artifactId>eventmesh-dashboard-core</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>

<!-- AOP -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import lombok.extern.slf4j.Slf4j;

@Slf4j
@SpringBootApplication(scanBasePackages = {"org.apache.eventmesh.dashboard.console", "org.apache.eventmesh.dashboard.core"})
@SpringBootApplication
@EnableTransactionManagement
public class EventMeshDashboardApplication {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

import org.apache.eventmesh.dashboard.service.meta.ConnectionCore;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
Expand All @@ -30,7 +29,9 @@
@RestController
public class ConnectionController {

@Autowired
/**
* TODO expose implement by FunctionManager
*/
ConnectionCore connectionCore;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@

@RestController
public class MetricsController {

@GetMapping("/druid/stat")
public Object druidStat() {
return DruidStatManagerFacade.getInstance().getDataSourceStatDataList();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
Expand All @@ -33,7 +32,9 @@
@RequestMapping("/api/v1")
public class SubscriptionController {

@Autowired
/**
* TODO expose implement by FunctionManager
*/
SubscriptionCore subscriptionCore;

// the subscription dataId naming pattern of EventMesh clients: ip-protocol
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.DeleteMapping;
Expand All @@ -40,7 +39,9 @@
@RequestMapping("/topic")
public class TopicController {

@Autowired
/**
* TODO expose implement by FunctionManager
*/
TopicCore topicCore;

/**
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,13 @@
* limitations under the License.
*/

package org.apache.eventmesh.dashboard.core.meta;
package org.apache.eventmesh.dashboard.core.meta.connection;

import org.apache.eventmesh.dashboard.service.meta.ConnectionCore;

import org.springframework.stereotype.Service;

import lombok.extern.slf4j.Slf4j;

@Slf4j
@Service
public class EtcdConnectionCore implements ConnectionCore {

}
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,13 @@
* limitations under the License.
*/

package org.apache.eventmesh.dashboard.core.meta;
package org.apache.eventmesh.dashboard.core.meta.connection;

import org.apache.eventmesh.dashboard.core.config.AdminProperties;
import org.apache.eventmesh.dashboard.service.meta.ConnectionCore;

import org.springframework.stereotype.Service;

import lombok.extern.slf4j.Slf4j;

@Slf4j
@Service
public class NacosConnectionCore implements ConnectionCore {

public NacosConnectionCore(AdminProperties adminProperties) {
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,17 @@
* limitations under the License.
*/

package org.apache.eventmesh.dashboard.core.meta;
package org.apache.eventmesh.dashboard.core.meta.subscription;

import org.apache.eventmesh.dashboard.common.dto.Result;
import org.apache.eventmesh.dashboard.common.model.SubscriptionInfo;
import org.apache.eventmesh.dashboard.service.meta.SubscriptionCore;

import java.util.List;

import org.springframework.stereotype.Service;

import lombok.extern.slf4j.Slf4j;

@Slf4j
@Service
public class EtcdSubscriptionCore implements SubscriptionCore {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.eventmesh.dashboard.core.meta;
package org.apache.eventmesh.dashboard.core.meta.subscription;

import static org.apache.eventmesh.dashboard.common.enums.Status.NACOS_EMPTY_RESP_ERR;
import static org.apache.eventmesh.dashboard.common.enums.Status.NACOS_GET_CONFIGS_ERR;
Expand All @@ -42,7 +42,6 @@
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestTemplate;
Expand All @@ -57,7 +56,6 @@
import lombok.extern.slf4j.Slf4j;

@Slf4j
@Service
public class NacosSubscriptionCore implements SubscriptionCore {

AdminProperties adminProperties;
Expand Down Expand Up @@ -114,7 +112,7 @@ public String retrieveConfig(String dataId, String group) {

/**
* Retrieve a list of configs with Nacos OpenAPI, because Nacos SDK doesn't support listing and fuzzy matching.
*
* <p>
* TODO Granularity should be based on subscriptions rather than Runtime;
* retrieve all subscriptions for each Runtime, rather than retrieving subscriptions for each individual Runtime.
*/
Expand Down

0 comments on commit bc51729

Please sign in to comment.