Spring Theory Complete
Spring Theory Complete
7. For logs
docker logs -f {id of the container} → This will start tailing the logs
8. List of containers which are running
docker container ls
13. Docker container kill command will immediately kill the container and –restart=always , will
restart the container when docker is restarted automatically
14. Docker stats
========================================================================
========================================================================
SPRING SECURITY
24. List of filters in spring security
1. Authorization filter : It will restrict the access of url that the user is trying to access.If its public
url then response will be provided back without asking any credentials
Here the do filter method will take the help of authorization manager to check if its a public or
private url , if its private then it will hand over the request to next filter.
2. DefaultLoginPageGeneratingFilter 👍
Login page is generated using this filter .
3. UsenamePasswordAuthenticationFilter : Once the user enters username and password then
the next filter that comes into place is usernamePasswordAuthenticationFilter . Inside this there
is a method called attemptauthentication , its responsibility is to extract username and
password from the request
This providerManager will interact with all the authentication providers until it sees successful
authentication or a failure authentication , by default it is daoAuthentication provider which
extends AbstractUserDetailsAuthenticationProvider . Here first of all it will retrieve username
from USerDetailsService
SPRING AOP
==============================================================================
===========================================================================
SPRING MVC
49. What is spring core and what all are its important features
50. What is a dependency injection
ComplexAlgorithmImpl binarySearch =
New ComplexAlgorithmImpl(new QuickSortAlgorithm());
This functionality is implemented by spring for us . Whenever it sees @autowire then it looks for
a bean of that type and injects it by setter injection or constructor injection.
Spring searches for the bean , finds the appropriate bean and autowire it in here.
Dependency injection is the process in which spring looks for the bean , identifies the
dependency and creates the instances of the bean and autowires them in .
ComplexAlgorithmImpl binarySearch =
New ComplexAlgorithmImpl(new QuickSortAlgorithm());
This kind of stuff is done by spring.
51. What is IOC
The right to create an object is moved from programmer to framework.
Bean factory does what basic of any IOC container does like
Find the beans
Wire the dependencies
Manage Lifecycle of the beans
Application Context : Another form of application context but with enhanced features
Bean Factory ++
Spring AOP features : Provides spring aspect oriented programming
I18n capabilities – internationalization capabilities , things like message sources
Web Application Context for web applications – like request , session , request scope ,
session scope
Spring recommends you to use application context. Use bean factory when u are in need of
severe memory constraint.
55. Different ways of creating an application context.
62. NoUniqueBeandefinationException
63. @componentscan
It is bascally a search spring does for the components. Input for the search is the packages.
77. @RequestMapping
81. @ResponseBody
82. @RestController
83. What is path variable
84. @RequestParam
85. @RequestBody
86. What is ResponseEntity
87. How to create a custom exception handling in springboot application
88. Input validation exception
=====================================================================================
====================================================================================
LOMBOK
==============================================================================
===========================================================================
SPRING JDBC
======================================================================
H2 database
96. What is an h2 database
97. To enable h2 database we need to do the following configurations
100. @SpringBootApplication
Server.port
103. @JsonProperty
110. @configurationProperties
In main class which has main method
111. What is profile
=================================================================
==============================================================
SWAGGER
112. How to add swagger dependency
124. How we can configure the refresh api of spring boot actuator
=========================================================================
========================================================
JUNIT
125. What is unit testing