-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSpring specific
More file actions
95 lines (79 loc) · 3.75 KB
/
Spring specific
File metadata and controls
95 lines (79 loc) · 3.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
if you want to update in bulk and don't want change the objects which are existing then, what mapping would you use ?
what is the difference between put and post mapping?
how do u validate a Json request ?
-- for size min 2 and max 3
-- it should not be null
what is the difference between @RestController and @Controller ?
Exception handling ?
security classes and methods used ?
what are transactional types in spring?
@Transactional(propagation = Propagation.REQUIRED)-- use existing transactions and if not create on
@Transactional(propagation = Propagation.REQUIRES_NEW)
-- use new transaction everytime you call.
@Transactional(isolation = Isolation.REPEATABLE_READ)
-- privents low latancy issues
circuit breaker design pattern
security implementation
csrf implemenation
request interceptor -- front controller
Hints :::
-- handlerInterseprtor
we need to overide methods
-- preHandler(HttpRequest request, HttpResponse response, Object headers)
-- afterCompletion(HttpRequest request, HttpResponse response, Object Headers, Exception ex)
spring batch ?
Exception handling
-- global exception handling.
\
Understand about dispatcher serve-let ?
What is a servlet ?
what is the difference between spring MVC and spring boot?
http is a interface or a protocals?
project flow to get all the employee details ?
how do you make signlton class thread safe?
have you worked Holder design patten ?
have you worked on multi-threaded environment?
were do we use CompatableFeature class ?
did you come accross circular design pattern?
- hint -- @Lazy when class A is dependent on B and B is dependent on C and finally C is dependent on A. making a circle then we come across this design pattern.
- @lazy is the solution for this problem
- BeanCurrentlyInCreationException.class
@bean creation and its scope
singleton implementation
what will happen if you have multiple application context.
will consumer provide any acknowledgement producer produces the message.
how does angular communicate with your back-end application
how is the authentication and authorisation is being handled.
how was the token handled in this case.
how spring initialises the beans into a @Autowired variable ? -- done
How do you handle Exception in a spring application
what do you know about springscheduler annotation?
what are the design patterns you have used in you application?
@CircuitBreaker
-- singletone
-- prototype
Spring Framework?
What is Spring DI ?
advantages of spring ?
Why @transactional ?
Why @qualifier ?
Where do you keep your configuration ?
======================================================================================================================================
API Versioning ?
-- eveolving api safely overtime
-- backword compatable
-- migrate client at there own pace
types : path change ie.. /v1 or /v2
header changes : ie.. Accept:application/vnd.myapp.v1+json
Ex: @GetMapping(produces = "application/vnd.myapp.v2+json")
public String getV2() {
query parameter : GET /api/users?version=1
public String getUser(@RequestParam("version") String version) {
if ("1".equals(version)) return "User v1";
======================================================================================================================================
what method would you use for bulk updates in your rest service ?
ANS: we have 3 options :
1 -- > PUT -- if you are changing the entire resourse in one go.
2 --> POST -- better performance
3 --> PATCH -- for partcial resourse update.
======================================================================================================================================