i
Infosys
Filter interviews by
I applied via Naukri.com and was interviewed before Jan 2021. There were 3 interview rounds.
Exception handling is crucial for any application. Spring Boot provides various ways to handle exceptions globally.
Spring Boot provides @ControllerAdvice annotation to handle exceptions globally
Exception handling can be done using @ExceptionHandler annotation
Spring Boot also provides a default error page for unhandled exceptions
Custom error pages can be created using ErrorController interface
Configure JPA with Spring Boot
Add the Spring Data JPA dependency in pom.xml
Create an entity class with @Entity annotation
Create a repository interface extending JpaRepository
Add @EnableJpaRepositories annotation to main class
Configure database properties in application.properties
Use @Transactional annotation for database transactions
To communicate between two REST APIs, use HTTP requests and implement security measures such as authentication and encryption.
Use HTTP requests such as GET, POST, PUT, and DELETE to communicate between two REST APIs
Implement authentication measures such as OAuth or API keys to ensure secure communication
Use encryption techniques such as SSL or TLS to protect sensitive data during transmission
Consider using a message br...
Authentication verifies identity, authorization verifies access. Spring Boot uses role-based authorization.
Authentication confirms the user's identity, authorization determines what the user can access
Spring Boot uses role-based authorization, where users are assigned roles and permissions are granted to those roles
Examples of authorization include file permissions, access control lists, and role-based access control
5 Spring boot annotations and their uses
1. @SpringBootApplication - used to mark the main class of a Spring Boot application
2. @RestController - used to mark a class as a RESTful controller
3. @Autowired - used to inject dependencies into a class
4. @RequestMapping - used to map HTTP requests to methods in a controller
5. @EnableAutoConfiguration - used to enable Spring Boot's auto-configuration feature
Designing a database for a parking lot and creating relationships between tables.
Create a table for parking spots with a unique ID
Create a table for vehicles with a unique ID
Create a table for parking transactions with a unique ID, parking spot ID, and vehicle ID
Establish a one-to-many relationship between parking spots and parking transactions
Establish a one-to-many relationship between vehicles and parking transactio
Creating relationships between tables in JPA using entities
Use annotations such as @ManyToOne, @OneToMany, @OneToOne, and @ManyToMany to define relationships
Specify the target entity and the mapping column using @JoinColumn
Use the mappedBy attribute to specify the inverse side of the relationship
Example: @ManyToOne(targetEntity = Author.class) @JoinColumn(name = "author_id") private Author author;
Example: @OneToMany(ma
Normalization is the process of organizing data in a database to reduce redundancy and improve data integrity. Indexing is the process of creating a data structure to improve the speed of data retrieval.
Normalization involves breaking down a table into smaller tables to reduce redundancy and dependency.
Indexing involves creating a data structure to improve the speed of data retrieval.
Normalization and indexing are impo...
Primary key uniquely identifies a record in a table, while unique key ensures uniqueness of a column.
Primary key cannot have null values, while unique key can have one null value.
A table can have only one primary key, but multiple unique keys.
Primary key is used as a foreign key in other tables to establish relationships.
Example: Employee ID can be a primary key, while email can be a unique key in an employee table.
A unique composite key is a combination of two or more columns that uniquely identifies a record in a table.
It is used to ensure data integrity and avoid duplicate records.
It is created by combining two or more columns that individually may not be unique.
Examples include a combination of first name, last name, and date of birth in a patient database.
It is commonly used in database design and normalization.
Singleton and Factory are design patterns used in software development.
Singleton pattern ensures that only one instance of a class is created and provides a global point of access to it.
Factory pattern provides an interface for creating objects in a superclass, but allows subclasses to alter the type of objects that will be created.
Singleton pattern is useful when we need to limit the number of instances of a class tha...
An immutable class is a class whose objects cannot be modified after creation.
Make all fields private and final
Do not provide any setter methods
Ensure that any mutable objects are defensively copied
Override equals() and hashCode() methods
Make the class final
A class in Spring MVC that provides global exception handling and model attributes for all controllers.
Used to handle exceptions across multiple controllers
Can add common model attributes to all controllers
Can be used to customize error responses
Can be annotated with @RestControllerAdvice to return JSON responses
The @primary annotation is used to mark a primary key in a database table.
It is used in database design to indicate the primary key of a table
It is often used in conjunction with other annotations such as @Entity and @Id
It can be used to specify the name of the primary key column
Example: @Entity @Table(name = "users") public class User { @Id @GeneratedValue @Column(name = "user_id") private Long id; }
Creating a Spring Boot application for web and database operations
Create a new Spring Boot project using Spring Initializr
Add necessary dependencies for web and database operations in pom.xml
Create a database schema and configure database connection in application.properties
Create entity classes and corresponding repositories
Create REST controllers for web operations
Test the application using Postman or any other REST
To write a REST API for updating and creating a new resource, follow these pointers.
Define the API endpoint and HTTP method for creating and updating resources
Validate the input data and handle errors appropriately
Update or create the resource in the database
Return a response with the updated or created resource and a status code indicating success
Infosys interview questions for designations
I applied via Job Portal
Get interview-ready with Top Infosys Interview Questions
I applied via Naukri.com and was interviewed in Nov 2024. There were 2 interview rounds.
Types of classes include abstract classes, concrete classes, interface classes, and inner classes.
Abstract classes cannot be instantiated and may contain abstract methods.
Concrete classes can be instantiated and provide implementations for all methods.
Interface classes define a contract for classes to implement.
Inner classes are classes defined within another class.
I address difficult situations within a team by promoting open communication, seeking to understand all perspectives, and collaborating on solutions.
Promote open communication to address issues early on
Seek to understand all perspectives before making decisions
Collaborate with team members to find mutually beneficial solutions
I applied via Referral and was interviewed in Oct 2024. There were 2 interview rounds.
I applied via Naukri.com and was interviewed in Sep 2024. There was 1 interview round.
Kersal server is a type of server used for hosting websites and applications.
Kersal server is known for its reliability and performance.
It is often used by businesses to host their websites and applications.
Kersal server offers features like high uptime, security, and scalability.
Examples of Kersal server providers include AWS, Google Cloud, and Microsoft Azure.
Dependency injection is a design pattern in which components are given their dependencies rather than creating them internally.
Dependency injection helps in achieving loose coupling between classes.
It allows for easier testing and maintenance of code.
There are three types of dependency injection: constructor injection, setter injection, and interface injection.
We are using a microservices architecture in our project.
Decomposes the application into smaller, independent services
Each service is responsible for a specific function
Allows for scalability and flexibility
Example: Netflix, Amazon, Uber
Overloading is having multiple methods in the same class with the same name but different parameters. Overriding is having a method in a subclass with the same name and parameters as a method in the superclass.
Overloading involves multiple methods with the same name but different parameters.
Overriding involves a method in a subclass with the same name and parameters as a method in the superclass.
Overloading is resolved...
MVC architecture is implemented by separating the application into Model, View, and Controller components.
Create models to represent data and business logic
Develop views to display the user interface
Write controllers to handle user input and update the model
I applied via Naukri.com and was interviewed in Nov 2024. There was 1 interview round.
What people are saying about Infosys
Some of the top questions asked at the Infosys Technology Analyst interview -
The duration of Infosys Technology Analyst interview process can vary, but typically it takes about less than 2 weeks to complete.
based on 220 interviews
5 Interview rounds
based on 4.3k reviews
Rating in categories
Technology Analyst
55.8k
salaries
| ₹3 L/yr - ₹11 L/yr |
Senior Systems Engineer
50.6k
salaries
| ₹2.8 L/yr - ₹9 L/yr |
System Engineer
39.5k
salaries
| ₹2.5 L/yr - ₹5.5 L/yr |
Technical Lead
30.8k
salaries
| ₹5.2 L/yr - ₹19.5 L/yr |
Senior Associate Consultant
27.8k
salaries
| ₹4.5 L/yr - ₹17 L/yr |
TCS
Wipro
Cognizant
Accenture