diff --git a/eventmesh-admin-kotlin/build.gradle.kts b/eventmesh-admin-kotlin/build.gradle.kts index ad0952c4e7..055e213fb9 100644 --- a/eventmesh-admin-kotlin/build.gradle.kts +++ b/eventmesh-admin-kotlin/build.gradle.kts @@ -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. + */ + plugins { java idea diff --git a/eventmesh-admin-kotlin/gradle/wrapper/gradle-wrapper.properties b/eventmesh-admin-kotlin/gradle/wrapper/gradle-wrapper.properties index 9f4197d5f4..2b303b2bb5 100644 --- a/eventmesh-admin-kotlin/gradle/wrapper/gradle-wrapper.properties +++ b/eventmesh-admin-kotlin/gradle/wrapper/gradle-wrapper.properties @@ -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. +# + distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip diff --git a/eventmesh-admin-kotlin/settings.gradle.kts b/eventmesh-admin-kotlin/settings.gradle.kts index df15945b86..dc86adb175 100644 --- a/eventmesh-admin-kotlin/settings.gradle.kts +++ b/eventmesh-admin-kotlin/settings.gradle.kts @@ -1 +1,18 @@ +/* + * 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. + */ + rootProject.name = "eventmesh-admin-kotlin" diff --git a/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/EventmeshAdminApplication.java b/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/EventmeshAdminApplication.java deleted file mode 100644 index eeefc05510..0000000000 --- a/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/EventmeshAdminApplication.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.apache.eventmesh.adminkotlin; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class EventmeshAdminApplication { - - public static void main(String[] args) { - SpringApplication.run(EventmeshAdminApplication.class, args); - } - -} diff --git a/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/config/Constants.java b/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/config/Constants.java deleted file mode 100644 index 591e8849b2..0000000000 --- a/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/config/Constants.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.apache.eventmesh.adminkotlin.config; - -public class Constants { - - // config - public static final String ADMIN_PROPS_PREFIX = "eventmesh"; - public static final String META_TYPE_NACOS = "nacos"; - public static final String META_TYPE_ETCD = "etcd"; - - // Open-API - public static final String HTTP_PREFIX = "http://"; - public static final String HTTPS_PREFIX = "https://"; - public static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss"; - - // Nacos - public static final String NACOS_LOGIN_API = "/nacos/v1/auth/login"; - public static final String NACOS_CONFIGS_API = "/nacos/v1/cs/configs"; -} diff --git a/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/dto/CommonResponse.java b/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/dto/CommonResponse.java deleted file mode 100644 index 9b5ff70c94..0000000000 --- a/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/dto/CommonResponse.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.apache.eventmesh.adminkotlin.dto; - -import lombok.Data; - -@Data -public class CommonResponse { - - private String data; - - private String message; - - public CommonResponse(String data) { - this.data = data; - } - - public CommonResponse(String message, Exception e) { - this.message = message; - if (e != null) { - this.message += ": " + e.getMessage(); - } - } -} diff --git a/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/model/ConnectionInfo.java b/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/model/ConnectionInfo.java deleted file mode 100644 index 26f7e5cf49..0000000000 --- a/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/model/ConnectionInfo.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.apache.eventmesh.adminkotlin.model; - -public class ConnectionInfo { - -} diff --git a/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/model/SubscriptionInfo.java b/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/model/SubscriptionInfo.java deleted file mode 100644 index 14aaef6762..0000000000 --- a/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/model/SubscriptionInfo.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.apache.eventmesh.adminkotlin.model; - -public class SubscriptionInfo { -} diff --git a/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/service/ConnectionService.java b/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/service/ConnectionService.java deleted file mode 100644 index 1b74e876c6..0000000000 --- a/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/service/ConnectionService.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.apache.eventmesh.adminkotlin.service; - -public interface ConnectionService { - -} diff --git a/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/service/SubscriptionService.java b/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/service/SubscriptionService.java deleted file mode 100644 index efb523f1fb..0000000000 --- a/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/service/SubscriptionService.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.apache.eventmesh.adminkotlin.service; - -import com.apache.eventmesh.adminkotlin.dto.CommonResponse; - -public interface SubscriptionService { - - CommonResponse retrieveConfig(String dataId, String group); - - String retrieveConfigs(Integer page, Integer size, String dataId, String group); -} diff --git a/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/service/impl/EtcdConnectionService.java b/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/service/impl/EtcdConnectionService.java deleted file mode 100644 index 57011b0db7..0000000000 --- a/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/service/impl/EtcdConnectionService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.apache.eventmesh.adminkotlin.service.impl; - -import org.springframework.stereotype.Service; - -import com.apache.eventmesh.adminkotlin.service.ConnectionService; - -import lombok.extern.slf4j.Slf4j; - -@Slf4j -@Service -public class EtcdConnectionService implements ConnectionService { - -} diff --git a/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/service/impl/EtcdSubscriptionService.java b/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/service/impl/EtcdSubscriptionService.java deleted file mode 100644 index 10747e8f96..0000000000 --- a/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/service/impl/EtcdSubscriptionService.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.apache.eventmesh.adminkotlin.service.impl; - -import org.springframework.stereotype.Service; - -import com.apache.eventmesh.adminkotlin.dto.CommonResponse; -import com.apache.eventmesh.adminkotlin.service.SubscriptionService; - -import lombok.extern.slf4j.Slf4j; - -@Slf4j -@Service -public class EtcdSubscriptionService implements SubscriptionService { - - @Override - public CommonResponse retrieveConfig(String dataId, String group) { - return null; - } - - @Override - public String retrieveConfigs(Integer page, Integer size, String dataId, String group) { - return null; - } -} diff --git a/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/service/impl/NacosConnectionService.java b/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/service/impl/NacosConnectionService.java deleted file mode 100644 index 0bbfe5bd9f..0000000000 --- a/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/service/impl/NacosConnectionService.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.apache.eventmesh.adminkotlin.service.impl; - -import java.util.Properties; - -import org.springframework.stereotype.Service; - -import com.apache.eventmesh.adminkotlin.config.AdminProperties; -import com.apache.eventmesh.adminkotlin.service.ConnectionService; - -import lombok.extern.slf4j.Slf4j; - -@Slf4j -@Service -public class NacosConnectionService implements ConnectionService { - - Properties properties = new Properties(); - - public NacosConnectionService(AdminProperties adminProperties) { - properties.setProperty("serverAddr", adminProperties.getMeta().getNacos().getAddr()); - properties.setProperty("username", adminProperties.getMeta().getNacos().getUsername()); - properties.setProperty("password", adminProperties.getMeta().getNacos().getPassword()); - properties.setProperty("namespace", adminProperties.getMeta().getNacos().getNamespace()); - properties.setProperty("timeoutMs", String.valueOf(adminProperties.getConfig().getTimeoutMs())); - } - -} diff --git a/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/EventmeshAdminApplication.java b/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/EventmeshAdminApplication.java new file mode 100644 index 0000000000..2ec653b0a9 --- /dev/null +++ b/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/EventmeshAdminApplication.java @@ -0,0 +1,30 @@ +/* + * 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.adminkotlin; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class EventmeshAdminApplication { + + public static void main(String[] args) { + SpringApplication.run(EventmeshAdminApplication.class, args); + } + +} diff --git a/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/config/AdminProperties.java b/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/config/AdminProperties.java similarity index 52% rename from eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/config/AdminProperties.java rename to eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/config/AdminProperties.java index cce515e988..210b4334a0 100644 --- a/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/config/AdminProperties.java +++ b/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/config/AdminProperties.java @@ -1,7 +1,21 @@ -package com.apache.eventmesh.adminkotlin.config; - -import static com.apache.eventmesh.adminkotlin.config.Constants.ADMIN_PROPS_PREFIX; -import static com.apache.eventmesh.adminkotlin.config.Constants.META_TYPE_NACOS; +/* + * 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.adminkotlin.config; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.stereotype.Component; @@ -10,7 +24,7 @@ @Data @Component -@ConfigurationProperties(prefix = ADMIN_PROPS_PREFIX) +@ConfigurationProperties(prefix = Constants.ADMIN_PROPS_PREFIX) public class AdminProperties { private MetaProperties meta = new MetaProperties(); @@ -20,7 +34,7 @@ public class AdminProperties { @Data public static class MetaProperties { - private String type = META_TYPE_NACOS; + private String type = Constants.META_TYPE_NACOS; private NacosProperties nacos = new NacosProperties(); diff --git a/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/config/Constants.java b/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/config/Constants.java new file mode 100644 index 0000000000..851190389a --- /dev/null +++ b/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/config/Constants.java @@ -0,0 +1,35 @@ +/* + * 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.adminkotlin.config; + +public class Constants { + + // config + public static final String ADMIN_PROPS_PREFIX = "eventmesh"; + public static final String META_TYPE_NACOS = "nacos"; + public static final String META_TYPE_ETCD = "etcd"; + + // Open-API + public static final String HTTP_PREFIX = "http://"; + public static final String HTTPS_PREFIX = "https://"; + public static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss"; + + // Nacos + public static final String NACOS_LOGIN_API = "/nacos/v1/auth/login"; + public static final String NACOS_CONFIGS_API = "/nacos/v1/cs/configs"; +} diff --git a/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/config/MetaTypeConfig.java b/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/config/MetaTypeConfig.java similarity index 51% rename from eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/config/MetaTypeConfig.java rename to eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/config/MetaTypeConfig.java index 605fc56303..bdfe93481a 100644 --- a/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/config/MetaTypeConfig.java +++ b/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/config/MetaTypeConfig.java @@ -1,18 +1,35 @@ -package com.apache.eventmesh.adminkotlin.config; +/* + * 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.adminkotlin.config; -import static com.apache.eventmesh.adminkotlin.config.Constants.META_TYPE_ETCD; -import static com.apache.eventmesh.adminkotlin.config.Constants.META_TYPE_NACOS; +import static org.apache.eventmesh.adminkotlin.config.Constants.META_TYPE_ETCD; +import static org.apache.eventmesh.adminkotlin.config.Constants.META_TYPE_NACOS; + +import org.apache.eventmesh.adminkotlin.service.ConnectionService; +import org.apache.eventmesh.adminkotlin.service.SubscriptionService; +import org.apache.eventmesh.adminkotlin.service.impl.EtcdConnectionService; +import org.apache.eventmesh.adminkotlin.service.impl.EtcdSubscriptionService; +import org.apache.eventmesh.adminkotlin.service.impl.NacosConnectionService; +import org.apache.eventmesh.adminkotlin.service.impl.NacosSubscriptionService; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import com.apache.eventmesh.adminkotlin.service.ConnectionService; -import com.apache.eventmesh.adminkotlin.service.SubscriptionService; -import com.apache.eventmesh.adminkotlin.service.impl.EtcdConnectionService; -import com.apache.eventmesh.adminkotlin.service.impl.EtcdSubscriptionService; -import com.apache.eventmesh.adminkotlin.service.impl.NacosConnectionService; -import com.apache.eventmesh.adminkotlin.service.impl.NacosSubscriptionService; - /** * Use different registry SDK depending on the configured meta type */ diff --git a/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/controller/ConnectionController.java b/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/controller/ConnectionController.java similarity index 51% rename from eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/controller/ConnectionController.java rename to eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/controller/ConnectionController.java index e7390dcad7..ce376badb9 100644 --- a/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/controller/ConnectionController.java +++ b/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/controller/ConnectionController.java @@ -1,12 +1,29 @@ -package com.apache.eventmesh.adminkotlin.controller; +/* + * 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.adminkotlin.controller; + +import org.apache.eventmesh.adminkotlin.service.ConnectionService; 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; -import com.apache.eventmesh.adminkotlin.service.ConnectionService; - import lombok.extern.slf4j.Slf4j; @Slf4j diff --git a/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/controller/SubscriptionController.java b/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/controller/SubscriptionController.java similarity index 66% rename from eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/controller/SubscriptionController.java rename to eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/controller/SubscriptionController.java index e76e94339e..dff373bb1c 100644 --- a/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/controller/SubscriptionController.java +++ b/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/controller/SubscriptionController.java @@ -1,4 +1,24 @@ -package com.apache.eventmesh.adminkotlin.controller; +/* + * 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.adminkotlin.controller; + +import org.apache.eventmesh.adminkotlin.dto.CommonResponse; +import org.apache.eventmesh.adminkotlin.service.SubscriptionService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; @@ -7,9 +27,6 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; -import com.apache.eventmesh.adminkotlin.dto.CommonResponse; -import com.apache.eventmesh.adminkotlin.service.SubscriptionService; - import lombok.extern.slf4j.Slf4j; @Slf4j diff --git a/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/dto/CommonResponse.java b/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/dto/CommonResponse.java new file mode 100644 index 0000000000..dba1965c12 --- /dev/null +++ b/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/dto/CommonResponse.java @@ -0,0 +1,39 @@ +/* + * 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.adminkotlin.dto; + +import lombok.Data; + +@Data +public class CommonResponse { + + private String data; + + private String message; + + public CommonResponse(String data) { + this.data = data; + } + + public CommonResponse(String message, Exception e) { + this.message = message; + if (e != null) { + this.message += ": " + e.getMessage(); + } + } +} diff --git a/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/model/ConnectionInfo.java b/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/model/ConnectionInfo.java new file mode 100644 index 0000000000..dd6996c8b3 --- /dev/null +++ b/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/model/ConnectionInfo.java @@ -0,0 +1,22 @@ +/* + * 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.adminkotlin.model; + +public class ConnectionInfo { + +} diff --git a/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/model/SubscriptionInfo.java b/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/model/SubscriptionInfo.java new file mode 100644 index 0000000000..9edc364115 --- /dev/null +++ b/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/model/SubscriptionInfo.java @@ -0,0 +1,21 @@ +/* + * 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.adminkotlin.model; + +public class SubscriptionInfo { +} diff --git a/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/service/ConnectionService.java b/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/service/ConnectionService.java new file mode 100644 index 0000000000..d4c465306b --- /dev/null +++ b/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/service/ConnectionService.java @@ -0,0 +1,27 @@ +/* + * 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.adminkotlin.service; + +/** + * "Connection" refers to the subscription relationship between connectors. + * It focuses on the configuration deployed on the source and sink connectors themselves, + * reported by the connector. + */ +public interface ConnectionService { + +} diff --git a/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/service/SubscriptionService.java b/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/service/SubscriptionService.java new file mode 100644 index 0000000000..6a7d801443 --- /dev/null +++ b/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/service/SubscriptionService.java @@ -0,0 +1,32 @@ +/* + * 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.adminkotlin.service; + +import org.apache.eventmesh.adminkotlin.dto.CommonResponse; + +/** + * "Subscription" refers to the traditional MQ producer-consumer topic subscription relationship, + * emphasizing the subscription relationship between EventMesh clients (including SDK and connectors) and topics, + * reported by the EventMesh runtime. + */ +public interface SubscriptionService { + + CommonResponse retrieveConfig(String dataId, String group); + + String retrieveConfigs(Integer page, Integer size, String dataId, String group); +} diff --git a/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/service/impl/EtcdConnectionService.java b/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/service/impl/EtcdConnectionService.java new file mode 100644 index 0000000000..9425d39a2b --- /dev/null +++ b/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/service/impl/EtcdConnectionService.java @@ -0,0 +1,30 @@ +/* + * 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.adminkotlin.service.impl; + +import org.apache.eventmesh.adminkotlin.service.ConnectionService; + +import org.springframework.stereotype.Service; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@Service +public class EtcdConnectionService implements ConnectionService { + +} diff --git a/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/service/impl/EtcdSubscriptionService.java b/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/service/impl/EtcdSubscriptionService.java new file mode 100644 index 0000000000..b0fd3bb4c5 --- /dev/null +++ b/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/service/impl/EtcdSubscriptionService.java @@ -0,0 +1,40 @@ +/* + * 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.adminkotlin.service.impl; + +import org.apache.eventmesh.adminkotlin.dto.CommonResponse; +import org.apache.eventmesh.adminkotlin.service.SubscriptionService; + +import org.springframework.stereotype.Service; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@Service +public class EtcdSubscriptionService implements SubscriptionService { + + @Override + public CommonResponse retrieveConfig(String dataId, String group) { + return null; + } + + @Override + public String retrieveConfigs(Integer page, Integer size, String dataId, String group) { + return null; + } +} diff --git a/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/service/impl/NacosConnectionService.java b/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/service/impl/NacosConnectionService.java new file mode 100644 index 0000000000..6739e81693 --- /dev/null +++ b/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/service/impl/NacosConnectionService.java @@ -0,0 +1,43 @@ +/* + * 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.adminkotlin.service.impl; + +import org.apache.eventmesh.adminkotlin.config.AdminProperties; +import org.apache.eventmesh.adminkotlin.service.ConnectionService; + +import java.util.Properties; + +import org.springframework.stereotype.Service; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@Service +public class NacosConnectionService implements ConnectionService { + + Properties properties = new Properties(); + + public NacosConnectionService(AdminProperties adminProperties) { + properties.setProperty("serverAddr", adminProperties.getMeta().getNacos().getAddr()); + properties.setProperty("username", adminProperties.getMeta().getNacos().getUsername()); + properties.setProperty("password", adminProperties.getMeta().getNacos().getPassword()); + properties.setProperty("namespace", adminProperties.getMeta().getNacos().getNamespace()); + properties.setProperty("timeoutMs", String.valueOf(adminProperties.getConfig().getTimeoutMs())); + } + +} diff --git a/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/service/impl/NacosSubscriptionService.java b/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/service/impl/NacosSubscriptionService.java similarity index 78% rename from eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/service/impl/NacosSubscriptionService.java rename to eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/service/impl/NacosSubscriptionService.java index 75708591e1..f2a299dec4 100644 --- a/eventmesh-admin-kotlin/src/main/java/com/apache/eventmesh/adminkotlin/service/impl/NacosSubscriptionService.java +++ b/eventmesh-admin-kotlin/src/main/java/org/apache/eventmesh/adminkotlin/service/impl/NacosSubscriptionService.java @@ -1,8 +1,26 @@ -package com.apache.eventmesh.adminkotlin.service.impl; - -import static com.apache.eventmesh.adminkotlin.config.Constants.HTTP_PREFIX; -import static com.apache.eventmesh.adminkotlin.config.Constants.NACOS_CONFIGS_API; -import static com.apache.eventmesh.adminkotlin.config.Constants.NACOS_LOGIN_API; +/* + * 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.adminkotlin.service.impl; + +import org.apache.eventmesh.adminkotlin.config.AdminProperties; +import org.apache.eventmesh.adminkotlin.config.Constants; +import org.apache.eventmesh.adminkotlin.dto.CommonResponse; +import org.apache.eventmesh.adminkotlin.service.SubscriptionService; import java.util.Collections; import java.util.Properties; @@ -21,9 +39,6 @@ import com.alibaba.nacos.api.NacosFactory; import com.alibaba.nacos.api.PropertyKeyConst; import com.alibaba.nacos.api.config.ConfigService; -import com.apache.eventmesh.adminkotlin.config.AdminProperties; -import com.apache.eventmesh.adminkotlin.dto.CommonResponse; -import com.apache.eventmesh.adminkotlin.service.SubscriptionService; import lombok.extern.slf4j.Slf4j; @@ -85,7 +100,7 @@ public CommonResponse retrieveConfig(String dataId, String group) { @Override public String retrieveConfigs(Integer page, Integer size, String dataId, String group) { UriComponentsBuilder urlBuilder = UriComponentsBuilder - .fromHttpUrl(HTTP_PREFIX + nacosProps.getProperty(PropertyKeyConst.SERVER_ADDR) + NACOS_CONFIGS_API) + .fromHttpUrl(Constants.HTTP_PREFIX + nacosProps.getProperty(PropertyKeyConst.SERVER_ADDR) + Constants.NACOS_CONFIGS_API) .queryParam("pageNo", page) .queryParam("pageSize", size) .queryParam("dataId", dataId) @@ -111,7 +126,7 @@ private String loginGetAccessToken() { bodyParams.put("username", Collections.singletonList(nacosProps.getProperty(PropertyKeyConst.USERNAME))); bodyParams.put("password", Collections.singletonList(nacosProps.getProperty(PropertyKeyConst.PASSWORD))); - String loginUrl = HTTP_PREFIX + nacosProps.getProperty(PropertyKeyConst.SERVER_ADDR) + NACOS_LOGIN_API; + String loginUrl = Constants.HTTP_PREFIX + nacosProps.getProperty(PropertyKeyConst.SERVER_ADDR) + Constants.NACOS_LOGIN_API; HttpEntity> loginRequest = new HttpEntity<>(bodyParams, headers); ResponseEntity loginResponse; try { diff --git a/eventmesh-admin-kotlin/src/test/java/com/apache/eventmesh/adminkotlin/EventmeshAdminApplicationTests.java b/eventmesh-admin-kotlin/src/test/java/com/apache/eventmesh/adminkotlin/EventmeshAdminApplicationTests.java deleted file mode 100644 index 34ad392291..0000000000 --- a/eventmesh-admin-kotlin/src/test/java/com/apache/eventmesh/adminkotlin/EventmeshAdminApplicationTests.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.apache.eventmesh.adminkotlin; - -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -@SpringBootTest -class EventmeshAdminApplicationTests { - - @Test - void contextLoads() { - } - -} diff --git a/eventmesh-admin-kotlin/src/test/java/org/apache/eventmesh/adminkotlin/EventmeshAdminApplicationTests.java b/eventmesh-admin-kotlin/src/test/java/org/apache/eventmesh/adminkotlin/EventmeshAdminApplicationTests.java new file mode 100644 index 0000000000..0ddf342f35 --- /dev/null +++ b/eventmesh-admin-kotlin/src/test/java/org/apache/eventmesh/adminkotlin/EventmeshAdminApplicationTests.java @@ -0,0 +1,30 @@ +/* + * 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.adminkotlin; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class EventmeshAdminApplicationTests { + + @Test + void contextLoads() { + } + +} diff --git a/eventmesh-admin-new/build.gradle b/eventmesh-admin-new/build.gradle index b107650e44..9370ce92e6 100644 --- a/eventmesh-admin-new/build.gradle +++ b/eventmesh-admin-new/build.gradle @@ -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. + */ + plugins { id 'java' id 'idea' diff --git a/eventmesh-admin-new/gradle/wrapper/gradle-wrapper.properties b/eventmesh-admin-new/gradle/wrapper/gradle-wrapper.properties index 9f4197d5f4..2b303b2bb5 100644 --- a/eventmesh-admin-new/gradle/wrapper/gradle-wrapper.properties +++ b/eventmesh-admin-new/gradle/wrapper/gradle-wrapper.properties @@ -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. +# + distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip diff --git a/eventmesh-admin-new/settings.gradle b/eventmesh-admin-new/settings.gradle index 8503594307..a2a99929ca 100644 --- a/eventmesh-admin-new/settings.gradle +++ b/eventmesh-admin-new/settings.gradle @@ -1 +1,18 @@ +/* + * 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. + */ + rootProject.name = 'eventmesh-admin-new' diff --git a/eventmesh-admin-new/src/main/java/com/apache/eventmesh/adminnew/EventmeshAdminApplication.java b/eventmesh-admin-new/src/main/java/com/apache/eventmesh/adminnew/EventmeshAdminApplication.java deleted file mode 100644 index af85dc6936..0000000000 --- a/eventmesh-admin-new/src/main/java/com/apache/eventmesh/adminnew/EventmeshAdminApplication.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.apache.eventmesh.adminnew; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class EventmeshAdminApplication { - - public static void main(String[] args) { - SpringApplication.run(EventmeshAdminApplication.class, args); - } - -} diff --git a/eventmesh-admin-new/src/main/java/org/apache/eventmesh/adminnew/EventmeshAdminApplication.java b/eventmesh-admin-new/src/main/java/org/apache/eventmesh/adminnew/EventmeshAdminApplication.java new file mode 100644 index 0000000000..cf4f0306fd --- /dev/null +++ b/eventmesh-admin-new/src/main/java/org/apache/eventmesh/adminnew/EventmeshAdminApplication.java @@ -0,0 +1,30 @@ +/* + * 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.adminnew; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class EventmeshAdminApplication { + + public static void main(String[] args) { + SpringApplication.run(EventmeshAdminApplication.class, args); + } + +} diff --git a/eventmesh-admin-new/src/test/java/com/apache/eventmesh/adminnew/EventmeshAdminApplicationTests.java b/eventmesh-admin-new/src/test/java/com/apache/eventmesh/adminnew/EventmeshAdminApplicationTests.java deleted file mode 100644 index 042cefdd56..0000000000 --- a/eventmesh-admin-new/src/test/java/com/apache/eventmesh/adminnew/EventmeshAdminApplicationTests.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.apache.eventmesh.adminnew; - -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -@SpringBootTest -class EventmeshAdminApplicationTests { - - @Test - void contextLoads() { - } - -} diff --git a/eventmesh-admin-new/src/test/java/org/apache/eventmesh/adminnew/EventmeshAdminApplicationTests.java b/eventmesh-admin-new/src/test/java/org/apache/eventmesh/adminnew/EventmeshAdminApplicationTests.java new file mode 100644 index 0000000000..7dffa13ffc --- /dev/null +++ b/eventmesh-admin-new/src/test/java/org/apache/eventmesh/adminnew/EventmeshAdminApplicationTests.java @@ -0,0 +1,30 @@ +/* + * 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.adminnew; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class EventmeshAdminApplicationTests { + + @Test + void contextLoads() { + } + +}