Spring Boot
Spring Boot
@Configuration declared class as full configuration class that class must not be final and it must
be public
@Bean declares bean configuration inside configuration class. It is mostly used on method and
@Component declared as class level annotation that marks class as spring component and this
class will be marked as spring bean. The class which is denoted by @Component annotation
If We are not provided name for bean then it will take method name as bean name
Dependency Injection:
o Configuration Method====We can inject more than one dependency in single method
o Setter Injection
@Qualifier If there are two beans of same type then we can use @Qualifier annotation for
separate bean by using name and @Qualifier annotation is used along with @Bean annotation.
@Primary It is used to make bean prioritized. Then the bean with @Primary will be always
injected
Bean Scoping:
o Types of scope:
Request
Session
Application
Web socket
o @Scope annotation is used to define scope of the bean.
@Value annotation is used to assign values to the members of the class through spring expression
language.
@PropertResources({@PropertyResource(“”),@PropertyResource(“”)}
Stateless protocol
HTTP Methods
HTTP Methods Uses
1.GET It is used to retrive data from the server it is read
only operation. It does not affect state of the
resource
Status Codes:
o 1XX---------------------------------> INFORMATIONAL
o 2XX--------------------------------->SUCCESS------->200(OK),201(Created)
o 3XX-------------------------------->REDIRECTION
o 4XX-------------------------------->CLIENT ERROR
o 5X----------------------------------->SERVER ERROR
Status Codes Information Code
1XX Informational
password)