Container Services
The supporting services the container offers beyond wiring: resource loading, type conversion and formatting, application events, message sources for i18n, and Bean Validation integration. Interviewers dip in here when they want breadth rather than Boot trivia.
part ofSpring Frameworkoverview, primer and where to startread it →on this pageshowhide
explore
- Resource Abstraction & ResourceLoader5 questions
- Type Conversion & Formatting5 questions
- Application Events6 questions
- MessageSource & i18n5 questions
- Bean Validation (JSR-380) Integration5 questions
- Data Binding, DataBinder & BeanWrapper6 questions
questions
page 2 of 2Explain the PropertyAccessor abstraction and the difference between BeanWrapper (property access) and direct field access in DataBinder. When would you switch, and what are the tradeoffs?
basics
~10 sPropertyAccessor is the get/set-by-name contract. BeanWrapper implements it via getters/setters; DirectFieldAccessor implements it by reflecting on fields directly. DataBinder.initDirectFieldAccess() switches from the former to the latter, so binding bypasses accessor methods.
What are the key production pitfalls with MessageSource around MessageFormat quoting, encoding, missing keys, and the parent hierarchy?
basics
~20 sWatch four things: single quotes must be doubled ('') only when a message has arguments; set defaultEncoding to UTF-8; decide missing-key behavior (throw vs default vs useCodeAsDefaultMessage); and set fallbackToSystemLocale=false so missing files fall back to the base bundle, not the server's locale.
showing 31–32 of 32