Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/new-register-flow
- Loading branch information
Showing
28 changed files
with
1,240 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ target/ | |
.DS_Store | ||
*~ | ||
packages/ | ||
**/dependency-reduced-pom.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...fer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/plugin/EnhanceContext.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package org.skywalking.apm.agent.core.plugin; | ||
|
||
/** | ||
* The <code>EnhanceContext</code> represents the context or status for processing a class. | ||
* | ||
* Based on this context, the plugin core {@link org.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassEnhancePluginDefine} | ||
* knows how to process the specific steps for every particular plugin. | ||
* | ||
* @author wusheng | ||
*/ | ||
public class EnhanceContext { | ||
private boolean isEnhanced = false; | ||
/** | ||
* The object has already been enhanced or extended. | ||
* e.g. added the new field, or implemented the new interface | ||
*/ | ||
private boolean objectExtended = false; | ||
|
||
public boolean isEnhanced() { | ||
return isEnhanced; | ||
} | ||
|
||
public void initializationStageCompleted() { | ||
isEnhanced = true; | ||
} | ||
|
||
public boolean isObjectExtended() { | ||
return objectExtended; | ||
} | ||
|
||
public void extendObjectCompleted() { | ||
objectExtended = true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...n/src/main/java/org/skywalking/apm/plugin/spring/mvc/RequestMappingMethodInterceptor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.skywalking.apm.plugin.spring.mvc; | ||
|
||
import java.lang.reflect.Method; | ||
|
||
import org.springframework.web.bind.annotation.RequestMapping; | ||
|
||
/** | ||
* The <code>RequestMappingMethodInterceptor</code> only use the first mapping value. | ||
* it will inteceptor with <code>@RequestMapping</code> | ||
* @author clevertension | ||
*/ | ||
public class RequestMappingMethodInterceptor extends AbstractMethodInteceptor { | ||
@Override | ||
public String getRequestURL(Method method) { | ||
String requestURL = ""; | ||
RequestMapping methodRequestMapping = method.getAnnotation(RequestMapping.class); | ||
if (methodRequestMapping.value().length > 0) { | ||
requestURL = methodRequestMapping.value()[0]; | ||
} else if (methodRequestMapping.path().length > 0) { | ||
requestURL = methodRequestMapping.path()[0]; | ||
} | ||
return requestURL; | ||
} | ||
} |
Oops, something went wrong.