Assess Spring IoC, AOP, JDBC, Security
TestGorillaSoftware Engineer · Online AssessmentLast updated
Assess Spring IoC, AOP, JDBC, Security evaluates engineering fundamentals, trade-offs, examples, pitfalls, and operational implications in a realistic interview setting. A strong answer states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.
Answer the following Spring Framework questions (some are single-choice):
- How do you instantiate a single Spring IoC container that loads multiple configuration files and is shared across the application?
- To log method arguments for auditing, which AOP advice should you use? Choose one: @Before, @After, @Around, or @AfterReturning.
- When multiple beans implement the same interface, how do you inject a specific implementation?
- What is the simplest way to inject a dependency/resource into a class in Spring?
- What is the easiest way to map a JDBC ResultSet to a Java bean when using Spring's JdbcTemplate?
- To connect to a MySQL database in Spring, which bean type should encapsulate the database connection? Choose one: DataSource, SQLConnector, MySqlConnector, or MySQLJDBC.
- In a Spring MVC/REST request handler, how do you access the currently authenticated user's details for logging?
- Using @PreAuthorize on a method, why might @PreAuthorize("hasRole('ROLE_ABC')") result in access denied, and what is the correct usage?
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.