HomeExamsJavaTETAJEEPRFIC3000
TETAJEEPRFIC3000

Infosys Certified Spring Boot Developer

Practice with real exam-pattern questions for Infosys Certified Spring Boot Developer. Each question includes a detailed explanation to help you understand the concept, not just memorise the answer. Try 10 questions free — no login required.

BeginnerJava40 min
Free questions

10 Infosys Certified Spring Boot Developer practice questions with answers

Real Lex exam-pattern multiple-choice questions for the Infosys Certified Spring Boot Developer certification. Each question includes the correct answer. The full question bank is available to Premium members.

  1. Question 1

    Spring Boot Runners are used to execute a set of code immediately after an application has started. Which of the below are the correct ways for implementing of the Spring Boot Runners? [Choose two]

    • @SpringBootApplication public class DemoSpringBootApplication implements CommandLineRunner { public static void main(String[] args) { SpringApplication.run(DemoSpringBootApplication.class, args); } @Override public void run(String... args) throws Exception { //code for executing the desired actions to be performed when the application starts } }

      Correct
    • B

      @SpringBootApplication public class DemoSpringBootApplication implements ApplicationRunner { public static void main(String[] args) { SpringApplication.run(DemoSpringBootApplication.class, args); } @Override public void run(ApplicationArguments args) throws Exception { //code for executing the desired actions to be performed when the application starts } }

    • C

      @SpringBootApplication public class DemoSpringBootApplication implements CommandLineRunner { public static void main(String[] args) { SpringApplication.run(DemoSpringBootApplication.class, args); } @Override public void run(ApplicationArguments args) throws Exception { //code for executing the desired actions to be performed when the application starts } }

    • D

      @SpringBootApplication public class DemoSpringBootApplication implements ApplicationRunner { public static void main(String[] args) { SpringApplication.run(DemoSpringBootApplication.class, args); } @Override public void run(String... args) throws Exception { //code for executing the desired actions to be performed when the application starts } }

  2. Question 2

    Annie is about to start working on a Spring Web Project using Spring Boot. Identify the required minimal number of dependencies by Annie to start developing the project ASAP, which doesn't use any database initially but all the events happening must be logged in an AOP way. Few starter dependencies are given as below:

    i. spring-boot-starter

    ii. spring-boot-starter-data-jpa

    iii. spring-boot-starter-data-mongodb

    iv. spring-boot-starter-web

    v. spring-boot-starter-validation

    vi. spring-boot-starter-actuator

    • Only iv is enough to start

      Correct
    • B

      i, ii and iv are required

    • C

      Both iv and v are required

    • D

      Both i and iv are required

    • E

      Both iv and vi are required

  3. Question 3

    Assuming that all the required import statements have been added, find the correct statement to be added in the main method of below code to get the output as "Hello Spring": (Select exactly 2 options)

    @Configuration

    class SpringConfig {

    @Bean(name="StringBean")

    public String string() {

    return "Hello Spring"; }

    }

    public class Tester {

    public static void main(String[] args) {

    ApplicationContext context=new AnnotationConfigApplicationContext(SpringConfig.class);

    //Statement to be added

    System.out.println(msg);

    }

    }

    • String msg = context.getBean(String.class);

      Correct
    • B

      String msg = context.getBean("StringBean");

    • C

      String msg = (String) context.getBean("StringBean");

    • D

      String msg = (String) context.getBean("string");

  4. Question 4

    package com.infy.config;

    @Configuration

    @ComponentScan

    public class SpringConfig { }

    package com.infy.demo;

    @Component

    public class Customer {

    private String customerName;

    //getters and setters

    public String registerCustomer(String name) {

    return "Welcome " + name + "! You are now our registered user!!";

    }

    }

    package com.infy.ui;

    public class UserInterface {

    public static void main(String[] args) {

    ApplicationContext context= new AnnotationConfigApplicationContext(SpringConfig.class);

    Customer customer=(Customer) context.getBean("customer");

    customer.setCustomerName("Tanaka");

    System.out.println(customer.registerCustomer(customer.getCustomerName()));

    }

    }

    What will be the output for the above code?

    • Welcome !You are now our registered user!!

      Correct
    • B

      NoSuchBean Exception

    • C

      Welcome Tarika! You are now our registered user!!

    • D

      Welcome null! You are now our registered user!!

  5. Question 5

    Which annotation is commonly used for field injection in Spring?

    • @Autowired

      Correct
    • B

      @Value

    • C

      @Qualifier

    • D

      @Inject

  6. Question 6

    Which of the below scope definitions are correct for the following CustomerService class? Assume that necessary imports are done. [Choose two]

    @Service

    public class CustomerService {

    //statements

    }

    • @Scope( "prototype")

      Correct
    • B

      @Scope( "Prototype")

    • C

      @Scope(value = "prototype")

    • D

      @Scope(value = "Prototype")

  7. Question 7

    Consider the below given code snippet, choose the correct statement from the following. [Assume all the necessary imports are done].

    @SpringBootApplication

    public class DemoSpringBootApplication {

    public static void main (String[] args) {

    SpringApplication.run(DemoSpringBootApplication.class, args);

    }

    @Bean

    public CustomerServiceImpl customerService() {

    return new CustomerServiceImpl();

    }

    }

    • @Bean definition cannot be added in starter class , should be added in configuration class

      Correct
    • B

      @Configuration annotation is missing on the DemoSpringBootApplication class

    • C

      Given code can execute successfully and creates a spring bean

    • D

      Bean name should be provided to avoid runtime exception

  8. Question 8

    Which of the following is not a Spring Boot feature?

    • Starter Dependencies

      Correct
    • B

      Auto Scanning

    • C

      Spring Boot Actuator

    • D

      Easy-to-use Embedded Servlet Container Support

  9. Question 9

    How can you enable logging to the console in Spring Boot?

    • Add the logging.file property to the application.properties file

      Correct
    • B

      Set the logging.level.root property to DEBUG or higher

    • C

      Add the console appender to the logging configuration

    • D

      Both B and C

  10. Question 10

    Which of the below statements are valid for testing a REST controller class using Spring Boot testing? [Choose two]

    • Add @WebMvcTest and @SpringBootTest on top of the test class

      Correct
    • B

      Add only @WebMvcTest on top of the test class

    • C

      Add only @SpringBootTest on top of the test class

    • D

      Use @TestConfiguration to define MockMvc bean

    • E

      Autowire MockMvc bean

Pricing

Pay once. Clear every cert this year.

One subscription, full Telegram channel access, every PDF posted during your membership.

Monthly
50% OFF
₹1,300₹2,600
Per month · cancel anytime
  • Full access to all 1,357+ certifications
  • Monthly updated question banks
  • Telegram private channel access
  • Cancel anytime
Get Monthly
POPULAR
Quarterly
44% OFF
₹1,800₹3,200
That's ₹600/mo · billed for 3 months
  • Everything in Monthly
  • Save ₹2,100 vs monthly billing
  • Priority answer key requests
  • Best for increasing DQ score fast
Get Quarterly
BEST VALUE
Lifetime
52% OFF
₹2,400₹5,000
One-time · lifetime access
  • Everything in Quarterly
  • Lifetime channel access — no renewals
  • All future certifications included
  • Priority response from admin team
Get Lifetime
FAQ

Common questions, straight answers.

A monthly-updated Telegram channel where we post real exam-pattern question banks and detailed answer keys for 1,357+ Infosys Lex certifications. You join once, you get every PDF posted during your membership.

Right after payment on our Graphy page, you'll receive a private invite link to the Telegram channel. Access is instant — usually under 30 seconds.

We compile question banks from the actual Lex test pattern, sourced and verified by 180K+ community members who've recently cleared these exams. Match rate is consistently 85–95%.

Every single month. When Infosys rolls out new versions of certifications, we post updated dumps within 7–10 days. You'll see channel activity weekly.

Clearing certifications is one of the highest-weighted DQ factors. Members typically clear 3–5 certifications in their first 3 months, which moves DQ scores up by a full band.

i
InfyLexDumps

Independent exam preparation platform for Infosys Lex certifications. Real exam-pattern question banks, monthly updates, 180K+ community members.

Join Premium Telegram
Contact
  • @prepflixadmin
  • admin@prepflix.net
This platform is an independent educational resource and is not affiliated with or endorsed by Infosys Ltd. All certification names referenced are property of their respective owners.
© 2026 InfyLexDumps
Join Premium Telegram