lets say that I have a bean call with two methods: foo and goo, and "goo" is marked with an AOP hook call.is it possible to write some piece of code inside 'foo' to call the goo method not directly, but through a bean proxy wrapper to activate part of AOP?
public Class Pojo{ public void foo(){ //what should I write here in order to activate 'goo' in transactional mode?? } @Transactional public void goo(){ } }
autwired. , , goo() ( ) foo()., , , foo(), Pojo bean. mothd Sun invokation bean ..
, spring:
public Class Pojo{ @Autowired private Pojo springProxy; public void foo(){ springProxy.goo(); } @Transactional public void goo(){ } }
Source: https://habr.com/ru/post/1761585/More articles:how to shorten a url in a mathematical approach - sqlI need a using statement when installing a control data source on sqldatareader - asp.netHow to extend the Zend Framework RESTful authentication application? - phpCalling a VB.NET web service using Java - javaActive or passive FTP detection - pythonКак правильно лицензировать виджет в отличие от приложения? - androidWhat is the difference between a semaphore and a critical region? - semaphoreUNIX BASH: extract a number from a string - stringhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1761589/in-a-sitemap-is-it-advisable-to-include-links-to-every-page-on-the-site-or-only-ones-that-need-it&usg=ALkJrhi_nMiAZrUhkqC31UG4q5WlNeExDwQuery without autosave - sqlAll Articles