Java Hyd Team
746 subscribers
986 photos
39 videos
670 files
690 links
https://teamhydteam.my.canva.site/

Can visit us on our website 😊
Still working on it 😊
Download Telegram
Hey guys get ready for some more opportunities today will update asap
If you can share your resume score of more than 80% we can try for mass Hiring
Java Hyd Team
SRS_Social Travel App.pdf
After your project is done do make one pdf or ppt like this to introduce your project in a good manner during the interview
Next 2 weeks no drives in sathya for Java
Java Hyd Team
Photo
Use this view for reference
Java Hyd Team
Photo
Don't write handler adaptor rest everything is same just replace everything with your file name
Anyone here intrested in opening for springboot


Location banglore
Q3.) What is IOC & IOC Lifecycle ?
A3.) it is a design pattern that allows program control to be inverted
or
transfer from traditional in-process control structure to separate service provider .
LifeCycle of IOC
1. Initialization :- IOC container is initialised and configured.
2. Binding :- Components are registered with container & can be specifying interfaces
.
3. Resolution :- Dependencies of the components are resolved and the appropriate
instance is created
4. Invocation :- Container invokes specific methods of the components.
5. Destruction :- Component destroyed & restore released
Q5.) What is dependency Injection and Types
A5.) a class receives instances of object it depends upon external
source rather than creating them itself .
this allows class to be independent of how the object
it depends on are created & makes code easier to maintain test
Rules of DI
1. Constructor-based Dependency Injection:- in this dependent object is provided
as the parameter in the constructor of class .
it is provided when class is instantiated.
2. Setter-based Dependency Injection :- dependent object is provided in class
through setter methods
this is useful when dependency is optional or when it can be changed even
after class is instantiated
3. Interface-based Dependency Injection :- defined some methods that must be
implemented by dependent objects
this is useful when class needs to be decoupled from dependent objects
allowing it into different implementations of dependent objects
4. Autowiring Dependency Injection :- this injection in spring
framework enables you to inject the object dependency implicitly.
It internally uses setter or constructor injection.
Autowiring can't be used to inject primitive and string values. It works with
reference only
Q11.) StereoType annotations & use ?
A11.) it is used to define & classify type of classes , fields & methods
it can be used to define / improve code readability & maintainability & to ensure that code elements are used properly.
it can be used to apply common behaviour such as applying security or logging ,across multiple elements examples of stereotype annotations in springboot

1. @Component: This stereotype annotation is used to mark a class as a component. It is used to indicate that a class is a candidate for auto-detection by Spring’s component scanning mechanism.

2. @Service: This stereotype annotation is used to mark a class as a service. It is used to indicate that a class is a business service class.

3. @Repository: This stereotype annotation is used to mark a class as a repository. It is used to indicate that a class is a data access object.

4. @Controller: This stereotype annotation is used to mark a class as a controller. It is used to indicate that a class is a web controller class.

5. @RestController: This stereotype annotation is used to mark a class as a rest controller. It is used to indicate that a class is a web rest controller class.
πŸ‘1
Q13.) @ComponentScan:-it is used to detect & register components /beans as managed by Spring frameWork .
it is used to detect classes annotated with @Component , @Service ,@Repository & @Controller

@Configuration:- it is used to define bean definitions in application Context.
it is used to define beans & their properties as part of Spring Framework.

@Value :- it is used to inject literal values into fields ,methods & constructor
it is used to inject literal values in properties

@Required :- it is used to indicate the presence of a dependency for a bean .
it is used to indicate bean property must be configured in bean configuration file .

@Controller :- it is used on a class that provides web interfaces .
it is used to denote class as controller class & will
be detected automatically detected by spring framework
for Component Scan & managed as bean.

@Service :- it is used for class that contains business logic.
it is used to denote that the class is a service class

@Repository :- it is used to indicate that class is repository
it is used to mark class as DataAccess object.
it is used in combination with other annotation such as service & Component
@EnableAutoConfiguration :- automatically configuration all stereotype classes & manage springBoot entire cycle
Q16.) Spring MVC execution flow ?
A16.)

1. User sends an HTTP Request to a web browser.

2. DispatcherServlet, receives the request and checks the web.xml file to identify the appropriate Controller.

3. The DispatcherServlet maps the request to the appropriate Controller and calls its handler methods.

4. The Controller processes the request and generates the Model or view object.

5. The view object is passed to the appropriate View Resolver.

6. The View Resolver identifies the appropriate View Component and prepares the output.

7. The DispatcherServlet passes the output to the web browser.
πŸ‘1
how to exclude embeded tomcat server in springboot

We can exclude the embedded Tomcat server in Spring Boot by setting the spring-boot-starter-web dependency scope to provided in the pom.xml file. This will make sure that the embedded Tomcat server will not be included in the build.

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<scope>provided</scope>
</dependency>
Q23.) @SpringBootApplication βž–
** the entry point of the spring boot application is the class contains @SpringBootApplication annotation & the main method
** it automatically scans all components included in the project by using @ComponentScan annotation
Indicates a configuration of class that declares one or more @Bean method & also triggers auto-configuration & component scanning
** this is convenience annotation this is equivalent to declare @Configuration + @EnableAutoConfiguration + @componentScan .
@RequestMapping(β€œ/”) βž–
It is used with class & method level in controller class & which indicates webapp http request or we can cast web-mapping of web request
@RequestBody βž–
In controller & in rest controller and in rest controller to write data to in the webpage body of the response in the form of String or in form of JSON object
πŸ‘1
what is @pathvariable annotation in java

The @PathVariable annotation is used to bind a method parameter to a URI template variable. This annotation is used to extract information from the URI path and bind it to the method parameter. It is part of the Spring Web MVC framework and is used in conjunction with the @RequestMapping annotation.
what is pojo poji bean model and entity in springboot

POJO (Plain Old Java Object) is a Java object that does not have any special methods or inherited classes. It is a basic object that just contains properties and getter/setter methods for accessing those properties.

A POJO bean model is an object-oriented representation of a domain model. It is an abstraction of a domain model that is used to facilitate communication between components. The POJO bean model is typically used in the service layer of an application to provide a consistent interface for different components to interact with.

An entity in Spring Boot is an object that represents a row in a database table. It is used to map the data in the database to an object-oriented model. Entities are the fundamental building blocks of any Spring Boot application. They are used to define the data model of the application and to make it easier to access the data in the database.
Java Hyd Team
Photo
MVC flow diagram
DO MISTAKES

DO BIG MISTAKES

DO LOT OF MISTAKES

DO LEARN FROM MISTAKES

MAKE A LIST WHAT YOU LEARNT FROM MISTAKES

SHARE YOUR EXPERIENCE WITH THEM


MAKE THEM EASY TO TACKLE SAME MISTAKES


WRITE A DIARY DAILY

PLAN YOUR DAY DAILY

PLAN YOUR NEXT 5 YEAR'S EVERY QUATER


JUST MAKE IT IN A FUN-WAY