Sobes.tech

Read the code and identify errors ```java @Component public class AuthorSearchService { @Autowired private AuthorRepository authorRepository; @Autowired private StatisticsRepository statisticsRepository; private AlertRestClient arc = new AlertRestClient(); // The query can contain either the full name or part of it, e.g., "Vadim Pavlo" or "pavlo" @Transactional public List<Author> search(String query) { List<Author> authors = authorRepository.findByNameContainingIgnoreCase(query); Statistics s = statisticsRepository.findById(query).orElse(null); if (s == null) s = new Statistics(query); s.setNumbers(s.getNumbers() + 1); statisticsRepository.save(s); if (s.getNumbers() > 1000 && authors.size() > 1000) { System.out.println("too popular search with too much data, sending an alert..."); arc.send(query, s.getNumbers(), authors.size()); } return authors; } } @Entity @Data public class Author { @Id @GeneratedValue private Long id; private String name; @OneToMany(mappedBy = "author") private List<Book> books; public Author(String name) { this.name = name; } } ```

175

What is transactional load? What was the transactional load in your system?

Senior
175

Do you think story points are truly useful or just a formality for managers?

Senior
175

What is the difference between the @Bean annotation and @Component?

Senior
175

Describe a complex task from your recent experience: what was the difficulty and how was it solved?

175

How to construct dynamic queries when filter conditions are unknown in advance (e.g., 10 optional fields)?

175

Why are you looking for a new job?

175

-- There are tables with the structure Employee id (PK) name salary dep_id(FK department.id) Department id (PK) name -- write a query that returns a list of all department names with the maximum salary in each department select d.name, COALESCE(MAX(e.salary), 0) from Department d left join Employee e on e.dep_id = d.id group by d.name

Senior
175

Was the transition from Java 17 stack to 21 a one-time switch, or do different services run on different versions?

175

How would you organize auditing of service calls, for example, Service A was called a million times, Service B — a hundred times in a day. How would you solve this task?

175

What Spring Cloud components have you used?

175

Situational question: the product team wants to implement integration via db-link with direct SELECTs instead of a normal adapter. What are your actions?

175

Do you see a weakness or a growth point for yourself?

175

What types of indexes were used? Were there any negative costs associated with the indexes?

Senior
175

What is the difference between HashMap and LinkedHashMap?

Senior
175
/696