-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NR-313390: Route detection support for Apache Struts2 Framework
- Loading branch information
1 parent
1b7651c
commit 149bbc2
Showing
3 changed files
with
44 additions
and
5 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
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
19 changes: 19 additions & 0 deletions
19
...c/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper_Instrumentation.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,19 @@ | ||
package org.apache.struts2.dispatcher.mapper; | ||
|
||
import com.newrelic.agent.security.instrumentation.apache.struts2.StrutsHelper; | ||
import com.newrelic.api.agent.weaver.MatchType; | ||
import com.newrelic.api.agent.weaver.Weave; | ||
import com.newrelic.api.agent.weaver.Weaver; | ||
import com.opensymphony.xwork2.config.ConfigurationManager; | ||
|
||
import javax.servlet.http.HttpServletRequest; | ||
|
||
@Weave(originalName = "org.apache.struts2.dispatcher.mapper.ActionMapper", type = MatchType.Interface) | ||
public class DefaultActionMapper_Instrumentation { | ||
|
||
public ActionMapping getMapping(HttpServletRequest request, ConfigurationManager configManager) { | ||
ActionMapping mapping = Weaver.callOriginal(); | ||
StrutsHelper.setRoute(mapping, configManager); | ||
return mapping; | ||
} | ||
} |