Browse Source

Integrate Cat in web

Yiming Liu 9 years ago
parent
commit
2c387e324f

+ 1 - 0
apollo-adminservice/src/main/resources/META-INF/app.properties

@@ -0,0 +1 @@
+app.id=100003172

+ 0 - 6
apollo-client/pom.xml

@@ -27,12 +27,6 @@
 			<artifactId>framework-foundation</artifactId>
 		</dependency>
 		<!-- end of foundation service -->
-		<!-- cat -->
-		<dependency>
-			<groupId>com.dianping.cat</groupId>
-			<artifactId>cat-client</artifactId>
-		</dependency>
-		<!-- end of cat -->
 		<!-- log -->
 		<dependency>
 			<groupId>org.slf4j</groupId>

+ 21 - 0
apollo-common/src/main/java/com/ctrip/apollo/common/controller/CatConfig.java

@@ -0,0 +1,21 @@
+package com.ctrip.apollo.common.controller;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import com.dianping.cat.servlet.CatFilter;
+import com.dianping.cat.servlet.CatListener;
+
+@Configuration
+public class CatConfig {
+
+  @Bean
+  public CatFilter catFilter() {
+    return new CatFilter();
+  }
+
+  @Bean
+  public CatListener catListener() {
+    return new CatListener();
+  }
+}

+ 1 - 0
apollo-configservice/src/main/resources/META-INF/app.properties

@@ -0,0 +1 @@
+app.id=100003171

+ 37 - 31
apollo-core/pom.xml

@@ -1,37 +1,43 @@
 <?xml version="1.0"  encoding="UTF-8"?>
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <parent>
-        <groupId>com.ctrip.apollo</groupId>
-        <artifactId>apollo</artifactId>
-        <version>0.0.1-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>apollo-core</artifactId>
-    <name>Apollo Core</name>
-    <packaging>jar</packaging>
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<parent>
+		<groupId>com.ctrip.apollo</groupId>
+		<artifactId>apollo</artifactId>
+		<version>0.0.1-SNAPSHOT</version>
+		<relativePath>../pom.xml</relativePath>
+	</parent>
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>apollo-core</artifactId>
+	<name>Apollo Core</name>
+	<packaging>jar</packaging>
 	<properties>
 		<github.path>${project.artifactId}</github.path>
 	</properties>
-    <dependencies>
-        <!-- json -->
-        <dependency>
-            <groupId>com.google.code.gson</groupId>
-            <artifactId>gson</artifactId>
-        </dependency>
-        <!-- end of json -->
-        <!-- util -->
-        <dependency>
-            <groupId>com.google.guava</groupId>
-            <artifactId>guava</artifactId>
-        </dependency>
-        <!-- end of util -->
-        <!-- log -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <!-- end of log -->
-    </dependencies>
+	<dependencies>
+		<!-- cat -->
+		<dependency>
+			<groupId>com.dianping.cat</groupId>
+			<artifactId>cat-client</artifactId>
+		</dependency>
+		<!-- end of cat -->
+		<!-- json -->
+		<dependency>
+			<groupId>com.google.code.gson</groupId>
+			<artifactId>gson</artifactId>
+		</dependency>
+		<!-- end of json -->
+		<!-- util -->
+		<dependency>
+			<groupId>com.google.guava</groupId>
+			<artifactId>guava</artifactId>
+		</dependency>
+		<!-- end of util -->
+		<!-- log -->
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-api</artifactId>
+		</dependency>
+		<!-- end of log -->
+	</dependencies>
 </project>

+ 1 - 0
apollo-portal/src/main/resources/META-INF/app.properties

@@ -0,0 +1 @@
+app.id=100003173