{"id":5159,"date":"2014-03-30T19:16:53","date_gmt":"2014-03-30T19:16:53","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/is-it-possible-to-make-a-aspect-request-scope-in-spring-collection-of-common-programming-errors\/"},"modified":"2014-03-30T19:16:53","modified_gmt":"2014-03-30T19:16:53","slug":"is-it-possible-to-make-a-aspect-request-scope-in-spring-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/is-it-possible-to-make-a-aspect-request-scope-in-spring-collection-of-common-programming-errors\/","title":{"rendered":"is it possible to make a @Aspect request scope in spring-Collection of common programming errors"},"content":{"rendered":"<p>is it possible to make a @Aspect request scope in spring? Because it seems that it doesn&#8217;t work, and it kind of makes sense; the proxy object isn&#8217;t actually injected anywhere, the advice is just applied by the runtime. Just wondering&#8230;<\/p>\n<p>Example:<\/p>\n<pre><code>@Aspect\npublic class MyAspect {\n    \/\/ expecting this to get autowired per request\n    @Autowired private HttpServletRequest request;\n\n    @Around(...)\n    public void doSomething(ProceedingJoinPoint pjp) {\n        \/\/ something here\n        pjp.proceed();\n        \/\/ something there\n    }\n}\n<\/code><\/pre>\n<p>And in XML:<\/p>\n<pre><code>\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>is it possible to make a @Aspect request scope in spring? Because it seems that it doesn&#8217;t work, and it kind of makes sense; the proxy object isn&#8217;t actually injected anywhere, the advice is just applied by the runtime. Just wondering&#8230; Example: @Aspect public class MyAspect { \/\/ expecting this to get autowired per request [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5159","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5159","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=5159"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5159\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5159"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}