digital-garden/notes/Собеседования/Задачи/Задача 15.md
2024-06-13 21:01:37 +03:00

30 lines
481 B
Markdown

---
parents:
- "[[Вопросы для собеседование Java]]"
---
```java
package dev.struchkov.example;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service
public class ExampleService {
public void method1() {
//do something ...
method2();
//do something ...
}
@Transactional
public void method2() {
//all code in transactional
}
}
```