You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by wu...@apache.org on 2018/11/26 10:29:31 UTC

[servicecomb-java-chassis] branch master updated: [SCB-1045]fix sample spring bean declaring

This is an automated email from the ASF dual-hosted git repository.

wujimin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-java-chassis.git


The following commit(s) were added to refs/heads/master by this push:
     new 2775f48  [SCB-1045]fix sample spring bean declaring
2775f48 is described below

commit 2775f4877bd688fcdabf7092e0f2a37f5a5f2ea7
Author: heyile <25...@qq.com>
AuthorDate: Mon Nov 26 17:35:43 2018 +0800

    [SCB-1045]fix sample spring bean declaring
---
 .../META-INF/spring/auth.provider.bean.xml         | 25 -------------------
 .../META-INF/spring/codefirst.consumer.bean.xml    | 25 -------------------
 .../META-INF/spring/codefirst.provider.bean.xml    | 25 -------------------
 .../spring/customhandler.consumer.bean.xml         | 25 -------------------
 .../spring/customhandler.provider.bean.xml         | 25 -------------------
 .../META-INF/spring/jaxrs.consumer.bean.xml        | 24 -------------------
 .../META-INF/spring/jaxrs.provider.bean.xml        | 25 -------------------
 .../samples/mwf/CloudEyeFilePublisher.java         |  4 ++--
 .../META-INF/spring/pojo.consumer.bean.xml         | 26 --------------------
 .../META-INF/spring/pojo.provider.bean.xml         | 25 -------------------
 .../META-INF/spring/springmvc.consumer.bean.xml    | 26 --------------------
 .../META-INF/spring/springmvc.provider.bean.xml    | 28 ----------------------
 12 files changed, 2 insertions(+), 281 deletions(-)

diff --git a/samples/auth-sample/auth-provider/src/main/resources/META-INF/spring/auth.provider.bean.xml b/samples/auth-sample/auth-provider/src/main/resources/META-INF/spring/auth.provider.bean.xml
deleted file mode 100644
index ebda145..0000000
--- a/samples/auth-sample/auth-provider/src/main/resources/META-INF/spring/auth.provider.bean.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xmlns:context="http://www.springframework.org/schema/context"
-  xsi:schemaLocation="http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
-
-  <context:component-scan base-package="org.apache.servicecomb.samples.auth.provider"/>
-</beans>
diff --git a/samples/codefirst-sample/codefirst-consumer/src/main/resources/META-INF/spring/codefirst.consumer.bean.xml b/samples/codefirst-sample/codefirst-consumer/src/main/resources/META-INF/spring/codefirst.consumer.bean.xml
deleted file mode 100644
index 8e90089..0000000
--- a/samples/codefirst-sample/codefirst-consumer/src/main/resources/META-INF/spring/codefirst.consumer.bean.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xmlns:context="http://www.springframework.org/schema/context"
-  xsi:schemaLocation="http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
-
-  <context:component-scan base-package="org.apache.servicecomb.samples.codefirst.consumer"/>
-</beans>
diff --git a/samples/codefirst-sample/codefirst-provider/src/main/resources/META-INF/spring/codefirst.provider.bean.xml b/samples/codefirst-sample/codefirst-provider/src/main/resources/META-INF/spring/codefirst.provider.bean.xml
deleted file mode 100644
index b94a4f0..0000000
--- a/samples/codefirst-sample/codefirst-provider/src/main/resources/META-INF/spring/codefirst.provider.bean.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xmlns:context="http://www.springframework.org/schema/context"
-  xsi:schemaLocation="http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
-
-  <context:component-scan base-package="org.apache.servicecomb.samples.codefirst.provider"/>
-</beans>
diff --git a/samples/custom-handler-sample/custom-handler-consumer/src/main/resources/META-INF/spring/customhandler.consumer.bean.xml b/samples/custom-handler-sample/custom-handler-consumer/src/main/resources/META-INF/spring/customhandler.consumer.bean.xml
deleted file mode 100644
index 4085730..0000000
--- a/samples/custom-handler-sample/custom-handler-consumer/src/main/resources/META-INF/spring/customhandler.consumer.bean.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xmlns:context="http://www.springframework.org/schema/context"
-  xsi:schemaLocation="http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
-
-  <context:component-scan base-package="org.apache.servicecomb.samples.customerhandler.consumer"/>
-</beans>
diff --git a/samples/custom-handler-sample/custom-handler-provider/src/main/resources/META-INF/spring/customhandler.provider.bean.xml b/samples/custom-handler-sample/custom-handler-provider/src/main/resources/META-INF/spring/customhandler.provider.bean.xml
deleted file mode 100644
index 372ce72..0000000
--- a/samples/custom-handler-sample/custom-handler-provider/src/main/resources/META-INF/spring/customhandler.provider.bean.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xmlns:context="http://www.springframework.org/schema/context"
-  xsi:schemaLocation="http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
-
-  <context:component-scan base-package="org.apache.servicecomb.samples.customerhandler.provider"/>
-</beans>
diff --git a/samples/jaxrs-sample/jaxrs-consumer/src/main/resources/META-INF/spring/jaxrs.consumer.bean.xml b/samples/jaxrs-sample/jaxrs-consumer/src/main/resources/META-INF/spring/jaxrs.consumer.bean.xml
deleted file mode 100644
index ec5c68c..0000000
--- a/samples/jaxrs-sample/jaxrs-consumer/src/main/resources/META-INF/spring/jaxrs.consumer.bean.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xmlns:context="http://www.springframework.org/schema/context"
-  xsi:schemaLocation="http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
-
-  <context:component-scan base-package="org.apache.servicecomb.samples.jaxrs.consumer"/>
-</beans>
diff --git a/samples/jaxrs-sample/jaxrs-provider/src/main/resources/META-INF/spring/jaxrs.provider.bean.xml b/samples/jaxrs-sample/jaxrs-provider/src/main/resources/META-INF/spring/jaxrs.provider.bean.xml
deleted file mode 100644
index 694664a..0000000
--- a/samples/jaxrs-sample/jaxrs-provider/src/main/resources/META-INF/spring/jaxrs.provider.bean.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xmlns:context="http://www.springframework.org/schema/context"
-  xsi:schemaLocation="http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
-
-  <context:component-scan base-package="org.apache.servicecomb.samples.jaxrs.provider"/>
-</beans>
diff --git a/samples/metrics-write-file-sample/metrics-write-file/src/main/java/org/apache/servicecomb/samples/mwf/CloudEyeFilePublisher.java b/samples/metrics-write-file-sample/metrics-write-file/src/main/java/org/apache/servicecomb/samples/mwf/CloudEyeFilePublisher.java
index 3cb9a51..0e85fcf 100644
--- a/samples/metrics-write-file-sample/metrics-write-file/src/main/java/org/apache/servicecomb/samples/mwf/CloudEyeFilePublisher.java
+++ b/samples/metrics-write-file-sample/metrics-write-file/src/main/java/org/apache/servicecomb/samples/mwf/CloudEyeFilePublisher.java
@@ -23,6 +23,7 @@ import org.apache.servicecomb.foundation.common.utils.JsonUtils;
 import org.apache.servicecomb.foundation.metrics.MetricsBootstrapConfig;
 import org.apache.servicecomb.foundation.metrics.MetricsInitializer;
 import org.apache.servicecomb.foundation.metrics.PolledEvent;
+import org.apache.servicecomb.foundation.metrics.registry.GlobalRegistry;
 import org.apache.servicecomb.serviceregistry.RegistryUtils;
 import org.apache.servicecomb.serviceregistry.api.registry.Microservice;
 import org.slf4j.Logger;
@@ -33,7 +34,6 @@ import com.fasterxml.jackson.core.JsonProcessingException;
 import com.google.common.eventbus.EventBus;
 import com.google.common.eventbus.Subscribe;
 import com.netflix.config.DynamicPropertyFactory;
-import com.netflix.spectator.api.CompositeRegistry;
 import com.netflix.spectator.api.Measurement;
 import com.netflix.spectator.api.Meter;
 import com.netflix.spectator.api.Tag;
@@ -56,7 +56,7 @@ public class CloudEyeFilePublisher implements MetricsInitializer {
   private String hostName;
 
   @Override
-  public void init(CompositeRegistry globalRegistry, EventBus eventBus, MetricsBootstrapConfig config) {
+  public void init(GlobalRegistry globalRegistry, EventBus eventBus, MetricsBootstrapConfig config) {
     eventBus.register(this);
 
     Microservice microservice = RegistryUtils.getMicroservice();
diff --git a/samples/pojo-sample/pojo-consumer/src/main/resources/META-INF/spring/pojo.consumer.bean.xml b/samples/pojo-sample/pojo-consumer/src/main/resources/META-INF/spring/pojo.consumer.bean.xml
deleted file mode 100644
index af61b9a..0000000
--- a/samples/pojo-sample/pojo-consumer/src/main/resources/META-INF/spring/pojo.consumer.bean.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xmlns:context="http://www.springframework.org/schema/context"
-  xsi:schemaLocation="http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
-
-  <context:component-scan base-package="org.apache.servicecomb.samples.pojo.consumer"/>
-
-</beans>
diff --git a/samples/pojo-sample/pojo-provider/src/main/resources/META-INF/spring/pojo.provider.bean.xml b/samples/pojo-sample/pojo-provider/src/main/resources/META-INF/spring/pojo.provider.bean.xml
deleted file mode 100644
index 86c6cd1..0000000
--- a/samples/pojo-sample/pojo-provider/src/main/resources/META-INF/spring/pojo.provider.bean.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xmlns:context="http://www.springframework.org/schema/context"
-  xsi:schemaLocation="http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
-
-  <context:component-scan base-package="org.apache.servicecomb.samples.pojo.provider"/>
-</beans>
diff --git a/samples/springmvc-sample/springmvc-consumer/src/main/resources/META-INF/spring/springmvc.consumer.bean.xml b/samples/springmvc-sample/springmvc-consumer/src/main/resources/META-INF/spring/springmvc.consumer.bean.xml
deleted file mode 100644
index ac7540a..0000000
--- a/samples/springmvc-sample/springmvc-consumer/src/main/resources/META-INF/spring/springmvc.consumer.bean.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xmlns:context="http://www.springframework.org/schema/context"
-  xsi:schemaLocation="http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
-
-  <context:component-scan base-package="org.apache.servicecomb.samples.springmvc.consumer"/>
-
-</beans>
diff --git a/samples/springmvc-sample/springmvc-provider/src/main/resources/META-INF/spring/springmvc.provider.bean.xml b/samples/springmvc-sample/springmvc-provider/src/main/resources/META-INF/spring/springmvc.provider.bean.xml
deleted file mode 100644
index 9982075..0000000
--- a/samples/springmvc-sample/springmvc-provider/src/main/resources/META-INF/spring/springmvc.provider.bean.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xmlns:context="http://www.springframework.org/schema/context"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans
-                        http://www.springframework.org/schema/beans/spring-beans.xsd
-                        http://www.springframework.org/schema/context
-                        http://www.springframework.org/schema/context/spring-context.xsd">
-
-  <context:component-scan base-package="org.apache.servicecomb.samples.springmvc.provider"/>
-</beans>