TestGorilla·Software Engineer·Online Assessment (OA)
May 2026
Took a Spring Framework assessment through TestGorilla for a Software Engineer role. It was a mix of multiple choice and open-ended questions covering IoC, AOP, security, and JdbcTemplate. Some of it was straightforward, a couple questions tripped me up more than I expected.
- How do you set up a single Spring IoC container that loads from multiple config files and is shared across the whole application?
- Which AOP advice type should you use if you need to log method arguments for auditing purposes? (Choose one: @Before, @After, @Around, or @AfterReturning)
- When multiple beans implement the same interface, how do you tell Spring which specific one to inject?
- What is the simplest way to inject a dependency into a Spring-managed class?
- What is the easiest way to map a JDBC ResultSet to a Java object 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 or REST controller, how do you access the currently authenticated user's details inside a request handler for logging?
- Why might @PreAuthorize("hasRole('ROLE_ABC')") cause an access denied error even for a user who should have that role, and what is the correct way to use it?
“Knew this one.”