Other Spring projects
26 questions in 10 subtopics.
Spring Integration
What problem does Spring Integration solve? Explain message, message channel, endpoint and theIntegrationFlow Java DSL with a small example that reads files from a directory, transforms each line and sends it to a channel.Design a Spring Integration flow that picks up partner order files from SFTP every minute, validates each record, sends valid records to Kafka and invalid ones to a dead-letter table, without processing a file twice when two instances run.Your organisation has integration code in Spring Integration, Apache Camel, a commercial ESB and many hand-written Kafka consumers. As the senior technical leader, how would you decide the integration strategy for the next five years?Spring Modulith
In Spring Modulith, how are application modules defined, and how do you write a test that fails the build when one module uses another module's internal classes?Explain Spring Modulith's event publication registry. What happens when an@ApplicationModuleListener fails or the application crashes after the publishing transaction commits, and how do you externalize such events to Kafka?Several teams share one large Spring Boot monolith with tangled packages. Leadership wants microservices. Explain how you would use Spring Modulith as the first step, and how you would decide later which modules become separate services.Spring Data REST
What does Spring Data REST generate from a repository interface, and how do you control which repositories and methods are exported, what the JSON looks like, and what validations run?A security review of a service built with Spring Data REST finds that any authenticated user can DELETE customers, can PATCH the role field of their own user record, and can list all users. What went wrong and how do you fix it?Spring HATEOAS
Using Spring HATEOAS, write a controller method that returns an order with a self link and a cancel link only when the order can still be cancelled. What does the response look like in HAL?An API guild debates whether all public REST APIs should use hypermedia (HAL with Spring HATEOAS) or plain JSON with OpenAPI. Give your recommendation and the criteria behind it.Spring Session
A Spring MVC application usesHttpSession and is scaled from one instance to four behind a load balancer; users are logged out randomly. How does Spring Session solve this, and what do you configure to store sessions in Redis?After a deployment, users of a Spring Session application backed by Redis get 500 errors with SerializationException: Cannot deserialize, and the log mentions InvalidClassException for a class stored in the session. Explain the cause and how to make future deployments safe.Your company runs 60 web applications, some on server sessions with Spring Session and Redis, some on JWTs stored in browser storage, some on sticky sessions. Define the session standard for web and mobile clients.Spring Shell
Write a small Spring Shell command 'import-users --fileusers.csv --dry-run' and explain how the command is registered, how options are parsed, and how you run the same command non-interactively from a script.Operations wants an internal admin CLI for support tasks (replay events, fix stuck orders) built with Spring Shell and using the same domain services as the main application. How would you design, secure and ship it?Spring Statemachine
Explain the main concepts of Spring Statemachine (states, events, transitions, guards, actions) using an order lifecycle NEW, PAID, SHIPPED, CANCELLED, and say how you would persist the state between requests.A team built an insurance claim workflow on Spring Statemachine with 30 states, nested regions and timers. Bugs appear when two events for the same claim arrive at once, and upgrades are painful. What would you review, and what alternatives would you consider?Your organisation depends on several smaller Spring projects with low release activity, such as Spring Statemachine and Spring Shell, plus many third-party libraries. As the senior technical leader, how do you govern adoption and exit of such dependencies?Spring LDAP
Using Spring LDAP, find all users in ou=people with a given email domain and map them to a Java object. How do you avoid LDAP injection?A Spring LDAP batch that reads all accounts from Active Directory returns only 1,000 entries, and under load another service gets connection timeouts to the directory. Explain both problems and the fixes.Spring Cloud Function
What is Spring Cloud Function? Show how ajava.util.function.Function bean becomes an HTTP endpoint or an AWS Lambda handler, and how you compose two functions.A Spring Cloud Function running on AWS Lambda has p99 cold starts of 6 seconds, and the business wants under 1 second. What options do you have and what are their trade-offs?Your company wants event-processing logic that can run on AWS Lambda, Azure Functions and Kubernetes depending on customer region. Would you standardize on Spring Cloud Function for this, and how would you structure the code and platform?Spring Vault
How does a Spring Boot application read secrets fromHashiCorp Vault with Spring Vault or Spring Cloud Vault, and which authentication method would you use on Kubernetes instead of a static token?You want each Spring Boot service to get short-lived PostgreSQL credentials from Vault's database secrets engine instead of a shared password. Explain the flow and how you handle credential expiry with a HikariCP pool.HashiCorp changed Vault's license to the Business Source License in 2023 and the OpenBao fork appeared, while cloud providers offer their own secret managers. As the senior technical leader, how do you decide the company's secrets management strategy?No question matches these choices.