Skip to content

Commit f9b70cc

Browse files
committed
Add one more code-review task & new YT link
1 parent 5328d58 commit f9b70cc

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ We can perceive materials in this folder as project backlog or "box with other s
263263
| GitHub Actions: workflows, coverage, badges | [YouTube](https://youtu.be/8O9ZmQfixF4) | [Repo1](https://github.com/andrei-punko/spring-boot-3-template) [Repo2](https://github.com/andrei-punko/aspectj-sandbox) [Repo3](https://github.com/andrei-punko/java-interview-coding) [Repo4](https://github.com/andrei-punko/spring-boot-jwt) |
264264
| Самодельный ArrayList 2 | [YouTube](https://youtu.be/VBdYvDW8WL8) | [Code](src/main/java/by/andd3dfx/collections/custom/CustomArrayList.java) |
265265
| Ревью и рефакторинг кода подписчика (Spring Boot сервис) | [YouTube](https://youtu.be/sQQ0pkR9YRM) | [Repo](https://github.com/EkaterinaBezheskaia/CaseLabTestTask) |
266+
| System Design: Scale from zero to millions of users (presentation) | [YouTube](https://youtu.be/wpif_188g1c) | - |
266267

267268
| Title | YouTube video link |
268269
|---------------------------------|:---------------------------------------:|
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Perform review of this code
2+
3+
How many instances of `PrototypeBean` class will be created?
4+
5+
```java
6+
@Configuration
7+
public class AppConfig {
8+
9+
@Bean
10+
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
11+
public PrototypeBean prototypeBean() {
12+
return new PrototypeBean();
13+
}
14+
15+
@Bean
16+
public MyService myService() {
17+
return new MyService();
18+
}
19+
}
20+
21+
public class MyService {
22+
23+
@Autowired
24+
private PrototypeBean prototypeBean;
25+
26+
public void method() {
27+
prototypeBean.get();
28+
prototypeBean.process();
29+
}
30+
}
31+
```

0 commit comments

Comments
 (0)