I want to know how spring change my method that has @transactional annotation on it? for example I read here about how to run a transactional method without using @transactional. What spring do exactly?
Spring effectively makes proxies for your objects. So if class "MyApplication" injects "DBService", and DBService has a @Transactional on it, spring will make a DBService Proxy. The Proxy will be injected into MyApplication, and all calls to methods of the DBService will instead call that Proxy. That Proxy would then be allowed to start transactions or do whatever it needs before calling the actual DBService method.
MyApplication -> DBService Proxy (intercepts calls) -> DBService
The details of how the proxy is made may change based on spring version and the way you've setup your code. You can use interfaces allowing spring to make a proxy of that, although, if you choose not to use interfaces, spring can extend the actual class too (using a library called CGLIB. Pre 4, this required a default constructor, although, in the latest Spring 4 the default constructor is not required and it does it via a slightly different mechanism)