Reference · vocabulary

Glossary

The exam is precise about words. These definitions are the ones we use in every lesson — learn them exactly. Grows as the course does.

A–C
ApplicationContext
Spring's central interface for the IoC container. A BeanFactory with enterprise extras: event publishing, i18n (MessageSource), resource loading, and automatic BeanPostProcessor/BeanFactoryPostProcessor registration. It's what actually holds and wires your beans.
Authentication vs Authorization
Authentication verifies who you are (identity); authorization decides what you may do. Authorization always comes after authentication. Key types: UserDetailsService loads a user by name → UserDetails (username/password/authorities); GrantedAuthority = one role/permission; PasswordEncoder hashes passwords. Spring Security runs as a servlet filter chain.
Method security
Securing individual methods (usually service-layer), enabled by @EnableGlobalMethodSecurity. @PreAuthorize/@PostAuthorize use SpEL (prePostEnabled=true); @Secured uses role names (securedEnabled=true); @RolesAllowed is JSR-250 (jsr250Enabled=true). URL-based rules instead use antMatchers/mvcMatchers.
Advice
(AOP) The action taken by an aspect at a join point — the "what". Types: @Before, @AfterReturning, @AfterThrowing, @After (finally), @Around.
Aspect
(AOP) A module of cross-cutting concern (e.g. logging, transactions) = pointcut + advice.
Auto-configuration
Spring Boot configuring beans for you based on the classpath, existing beans, and properties. Triggered by @EnableAutoConfiguration; classes listed in META-INF/spring.factories, each guarded by @Conditional annotations (@ConditionalOnClass, @ConditionalOnMissingBean, @ConditionalOnProperty). Override by defining your own bean (auto-config backs off), or exclude with @SpringBootApplication(exclude=...).
@SpringBootApplication
Shorthand for @SpringBootConfiguration + @EnableAutoConfiguration + @ComponentScan. Place it on the main class; SpringApplication.run() boots the context and embedded server (Tomcat by default). A starter is a dependency descriptor; the parent POM / BOM manages versions.
@ConfigurationProperties
Binds a group of external properties (under a prefix) to a strongly-typed bean's fields — cleaner than many @Values. Property precedence (high→low): command-line args → env vars → application-{profile} → application.properties → @PropertySource → defaults.
Actuator
Production endpoints (health, info, metrics, beans…) under /actuator. Two switches per endpoint: enabled (all except shutdown by default) and exposed (HTTP → only health; JMX → all). Expose more with management.endpoints.web.exposure.include. Health statuses: UP/DOWN/OUT_OF_SERVICE/UNKNOWN; custom checks via HealthIndicator; custom metrics via Micrometer's MeterRegistry; secure with Spring Security.
Autowiring
Spring supplying a bean's dependencies automatically. With @Autowired, resolution is by type first, then narrowed by @Qualifier / @Primary / bean name.
Bean
An object instantiated, assembled, and managed by the Spring IoC container. If Spring made it and holds it, it's a bean.
BeanFactory
The most basic IoC container interface. ApplicationContext extends it. Lazy by default; ApplicationContext pre-instantiates singletons eagerly.
BeanPostProcessor (BPP)
Extension point that operates on bean instances — postProcessBeforeInitialization / AfterInitialization. This is how proxies (AOP, @Transactional) get wrapped around beans.
BeanFactoryPostProcessor (BFPP)
Extension point that operates on bean definitions (metadata) before any bean is instantiated. e.g. PropertySourcesPlaceholderConfigurer resolving ${...}.
Component scanning
Automatic detection of classes annotated with stereotypes (@Component and friends) to register them as beans. Enabled by @ComponentScan (included in @SpringBootApplication).
D–P
DispatcherServlet
Spring MVC's front controller — the single servlet that receives every request and orchestrates the flow: HandlerMapping (find the handler) → HandlerAdapter (invoke it) → ViewResolver/View (render HTML) or HttpMessageConverter (serialise JSON for REST). Auto-configured by Spring Boot.
DataAccessException
Root of Spring's unchecked data-access exception hierarchy. Spring translates vendor-specific SQLExceptions into these portable, technology-agnostic exceptions.
Dependency Injection (DI)
The pattern where an object's dependencies are supplied from outside rather than created internally. Constructor injection is preferred (immutability, testability, no partially-built objects).
JdbcTemplate
The central Spring JDBC class. Manages the Connection/Statement/ResultSet lifecycle, runs SQL, and translates SQLExceptions into DataAccessExceptions. A template-method + callback design; acquires a connection per operation, not at construction. query* = read, update = DML, execute = DDL.
Inversion of Control (IoC)
The principle that the framework, not your code, controls object creation and wiring. DI is how Spring implements IoC.
Join point
(AOP) A point during execution where advice can run. In Spring AOP this is always a method execution.
Pointcut
(AOP) A predicate that selects join points — the "where". e.g. execution(* com.app.service.*.*(..)).
Primary / Qualifier
@Primary marks the default bean when multiple candidates match by type; @Qualifier("name") selects a specific one at the injection point.
Profile
A named group of beans active only in certain environments. @Profile("dev") registers a bean when dev is active; !prod negates, {"a","b"} is OR, "a & b" is AND. A bean with no @Profile is always active. Activated via spring.profiles.active, the SPRING_PROFILES_ACTIVE env var, or @ActiveProfiles in tests.
@PropertySource
Declaratively adds a .properties file to the Environment's property sources (on a @Configuration class). Does not load YAML, and does not bind to a POJO — that's @ConfigurationProperties.
Proxy
A generated wrapper Spring places around a bean to add behaviour (AOP advice, transactions). JDK dynamic proxy if the bean implements an interface; CGLIB subclass proxy otherwise. Self-invocation (calling this.method()) bypasses the proxy.
S–T
Repository (Spring Data)
An interface you declare (extending CrudRepository / PagingAndSortingRepository / JpaRepository) that Spring Data implements as a runtime proxy. Hierarchy adds: CRUD → paging & sorting → JPA extras. Queries come from derived method names (findByEmailGreaterThan…) or an explicit @Query (JPQL, or native SQL with nativeQuery=true).
Scope
The lifecycle & visibility of a bean instance. singleton (default, one per container), prototype (new each request), plus web scopes request, session, application, websocket.
Safe vs idempotent (HTTP)
Safe = no state change (GET, HEAD). Idempotent = repeating has the same effect as once (GET, PUT, DELETE). POST is neither. Key status codes: 200 OK, 201 Created, 204 No Content, 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 500 Server Error.
RestTemplate
Spring's synchronous HTTP client for consuming REST services (getForObject, getForEntity, postForObject, exchange…), using HttpMessageConverters. WebClient is the modern reactive alternative, but the exam tests RestTemplate.
SpEL — ${...} vs #{...}
${...} is a property placeholder resolved from the Environment by PropertySourcesPlaceholderConfigurer. #{...} is a SpEL expression evaluated at runtime — it can reference beans, call methods, use operators, and read systemProperties. They are not interchangeable, and SpEL does not itself resolve ${...}.
Stereotype annotation
A specialised @Component: @Service, @Repository (adds exception translation), @Controller/@RestController. All are detected by component scanning.
PlatformTransactionManager
The central strategy interface of Spring's transaction abstraction. Implementations per technology: DataSourceTransactionManager (JDBC), JpaTransactionManager (JPA), JtaTransactionManager (global/distributed). @Transactional and TransactionTemplate both delegate to it.
Transaction rollback (default rule)
Spring rolls back automatically on unchecked exceptions (RuntimeException) and Error, but commits on checked exceptions. Override with rollbackFor / noRollbackFor.
Test slice
A Boot annotation that auto-configures only one layer and scans only its beans, for fast focused tests. @WebMvcTest (controllers + MockMvc, no services), @DataJpaTest (repositories + in-memory DB, rolls back), @JsonTest. Contrast @SpringBootTest, which loads the whole context.
@MockBean vs @Mock
@MockBean puts a Mockito mock into the Spring ApplicationContext (so autowired collaborators receive it); a plain @Mock lives only in the test object. MockMvc tests controllers server-side without a real HTTP server.
Transaction propagation
How a @Transactional method joins/creates transactions. Defaults to REQUIRED (join existing or start new); REQUIRES_NEW always starts a new one; NESTED uses savepoints.
Missing a term? Ask your teacher to add it — the glossary grows with the course.