PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Software Engineering Fundamentals/TestGorilla

Assess Spring IoC, AOP, JDBC, Security

Last updated: Mar 29, 2026

Quick Overview

This question evaluates knowledge of the Spring Framework — specifically IoC container configuration, AOP advice selection, bean injection and wiring, JdbcTemplate result mapping, DataSource-based database connectivity, and method-level security within the Software Engineering Fundamentals domain.

  • medium
  • TestGorilla
  • Software Engineering Fundamentals
  • Software Engineer

Assess Spring IoC, AOP, JDBC, Security

Company: TestGorilla

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: medium

Interview Round: Take-home Project

Answer the following Spring Framework questions (some are single-choice): 1) How do you instantiate a single Spring IoC container that loads multiple configuration files and is shared across the application? 2) To log method arguments for auditing, which AOP advice should you use? Choose one: @Before, @After, @Around, or @AfterReturning. 3) When multiple beans implement the same interface, how do you inject a specific implementation? 4) What is the simplest way to inject a dependency/resource into a class in Spring? 5) What is the easiest way to map a JDBC ResultSet to a Java bean when using Spring's JdbcTemplate? 6) To connect to a MySQL database in Spring, which bean type should encapsulate the database connection? Choose one: DataSource, SQLConnector, MySqlConnector, or MySQLJDBC. 7) In a Spring MVC/REST request handler, how do you access the currently authenticated user's details for logging? 8) Using @PreAuthorize on a method, why might @PreAuthorize("hasRole('ROLE_ABC')") result in access denied, and what is the correct usage?

Quick Answer: This question evaluates knowledge of the Spring Framework — specifically IoC container configuration, AOP advice selection, bean injection and wiring, JdbcTemplate result mapping, DataSource-based database connectivity, and method-level security within the Software Engineering Fundamentals domain.

TestGorilla logo
TestGorilla
Jul 31, 2025, 12:00 AM
Software Engineer
Take-home Project
Software Engineering Fundamentals
5
0

Spring Framework — Multi-part Questions

Context: You are building/maintaining a Spring-based service for a take‑home engineering assessment.

Answer the following (some are single-choice):

  1. How do you instantiate a single Spring IoC container that loads multiple configuration files and is shared across the application?
  2. To log method arguments for auditing, which AOP advice should you use? Choose one: @Before, @After, @Around, or @AfterReturning.
  3. When multiple beans implement the same interface, how do you inject a specific implementation?
  4. What is the simplest way to inject a dependency/resource into a class in Spring?
  5. What is the easiest way to map a JDBC ResultSet to a Java bean when using Spring's JdbcTemplate?
  6. To connect to a MySQL database in Spring, which bean type should encapsulate the database connection? Choose one: DataSource, SQLConnector, MySqlConnector, or MySQLJDBC.
  7. In a Spring MVC/REST request handler, how do you access the currently authenticated user's details for logging?
  8. Using @PreAuthorize on a method, why might @PreAuthorize("hasRole('ROLE_ABC')") result in access denied, and what is the correct usage?

Solution

Show

Submit Your Answer

Sign in to leave a comment

Loading comments...

Browse More Questions

More Software Engineering Fundamentals•More TestGorilla•More Software Engineer•TestGorilla Software Engineer•TestGorilla Software Engineering Fundamentals•Software Engineer Software Engineering Fundamentals
PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.