Craig Walls

Author of 'Spring in Action' and 'Building Talking Apps'

Craig Walls is a Principal Engineer, Java Champion, Alexa Champion, and the author of Spring AI in Action, Spring in Action, and Build Talking Apps. He's a zealous promoter of the Spring Framework, speaking frequently at local user groups and conferences and writing about Spring. When he's not slinging code, Craig is planning his next trip to Disney World or Disneyland and spending as much time as he can with his wife, two daughters, 1 bird and 2 dogs.

Presentations

Spring Security has long been a powerful guard to place around your Spring applications, providing authentication, authorization, and many more concerns around keeping your application secure.

As time has progressed, Spring Security has evolved to provide even more capabilities, but has applied some self-improvement to make working with Spring Security even easier. That is to say, the way you configure and apply Spring Security today has changed dramatically from it's early XML-oriented approach and is even different now than some of the more recent Java-based configuration strategies.

In this example-driven session, we'll explore the latest and greatest that Spring Security has to offer, with an emphasis on how to apply security aspects to your applications with the latest configuration styles supported by Spring Security. You'll see how security is enabled in modern Spring applications using the Lambda DSL configuration approach, the preferred way to configure Spring Security and the ONLY way to configure Spring Security 7.

By now, you've no doubt noticed that Generative AI is making waves across many industries. In between all of the hype and doubt, there are several use cases for Generative AI in many software projects. Whether it be as simple as building a live chat to help your users or using AI to analyze data and provide recommendations, Generative AI is becoming a key piece of software architecture.

So how can you implement Generative AI in your projects? Let me introduce you to Spring AI.

For over two decades, the Spring Framework and its immense portfolio of projects has been making complex problems easy for Java developers. And now with the new Spring AI project, adding Generative AI to your Spring Boot projects couldn't be easier! Spring AI brings an AI client and templated prompting that handles all of the ceremony necessary to communicate with common AI APIs (such as OpenAI and Azure OpenAI). And with Spring Boot autoconfiguration, you'll be able to get straight to the point of asking questions and getting answers your application needs.

In this handson workshop, you'll build a complete Spring AIenabled application applying such techniques as prompt templating, Retrieval Augmented Generation (RAG), conversational history, and tools invocation. You'll also learn prompt engineering techniques that can help your application get the best results with minimal “hallucinations” while minimizing cost.

Although Java originally promised to write once, run anywhere, it failed to fully deliver on that promise. As developers, we can develop, test, and build our applications into WAR or executable JAR files and then toss them over the wall to a Java application server and Java runtime that we have no control over, giving us zero confidence that the application will behave the same as when we tested it.

Containers fulfill the write-once, run anywhere promise that Java wasn't able to, by packaging the runtime and even the operating system along with our application, giving greater control and confidence that the application will function the same anywhere it is run. Additionally, containers afford several other benefits, including easy scaling, efficiency in terms of resource utilization, and security by isolating containers from their host system and from other containers.

While deploying Spring applications in containers has always been possible, Spring Boot 2.3 makes it easier to containerize our applications and run them in container architectures such as Kubernetes. Spring Boot 2.3's support for containerization includes two options: Creating containers based on buildpacks or using layers as a means of modularizing and reducing the size of our application deployments. Moreover, new components in the Spring ecosystem can make your Spring applications Kubernetes-savvy so that they can take advantage of what a containerized architecture has to offer.

In this hands-on workshop, learn how to build Spring applications that can be deployed as containers in a Kubernetes cluster. You'll not only build your Spring application as an image that can be deployed in Kubernetes, but you'll also learn how to take advantage of Spring's first-class support for container-based applications, including graceful shutdown, liveness and readiness probes, and ConfigMap-based property sources.

In this hands-on workshop, you'll learn to create voice-first applications for both Amazon's Alexa and Google's Assistant platforms. In addition, we'll also cover creating visual UIs to accompany the voice-first applications (for devices such as Echo Show).

No prior experience with voice applications is required and you do not even need to own a home assistant device to get started. Elementary experience with NodeJS is required. You'll also need developer accounts for both AWS and Google.

The way we communicate with our applications is an ever-evolving experience. Punch cards gave way to keyboards. Typing on keyboards was then supplemented by pointing and clicking with a mouse. And touch screens on our phones, tablets, and computers are now a common means of communicating with applications.

These all lack one thing, however: They aren’t natural.

As humans, we often communicate with each other through speech. If you were to walk up to another human and start tapping them, you’d likely be tapped (or punched) in response. But when we talk to our applications, we communicate on the machine’s terms, with keyboards, mice, and touch screens. Even though we may use these same devices to communicate with other humans, it’s really the machine we are communicating with—​and those machines relay what we type, click, and tap to another human using a similar device.

Voice user-interfaces (Voice UIs) enable us to communicate with our application in a human way. They give our applications the means to communicate to us on our terms, using voice. With a voice UI, we can converse with our applications in much the same way we might talk with our friends.

Voice UIs are truly the next logical step in the evolution of human-computer interaction. And this evolutionary step is long overdue. For as long as most of us can remember, science fiction has promised us the ability to talk to our computers. The robot from Lost in Space, the Enterprise computer on Star Trek, Iron Man’s Jarvis, and HAL 9000 (okay, maybe a bad example) are just a few well-recognized examples of science fiction promising a future where humans and computers would talk to each other.

Our computers are far more powerful today than the writers of science fiction would have imagined. And the tablet that Captain Picard used in his ready room on Star Trek: The Next Generation is now available with the iPad and other tablet devices. But only recently have voice assistants such as Alexa and Google Assistant given us the talking computer promised to us by science-fiction.

Introducing Spring Modulith

Although microservices are still a useful architectural choice, the balance of additional complexity and the advantages of microservice architecture do not necessarily work out in the benefit of all applications. While most application will benefit from improved modularity, the challenges that come with distributed computing may be too much for some applications to take on. A well-structured and modular monolithic application might be a better fit.

In this session, we'll explore Spring Modulith, a relatively new Spring library that enables developers to build well-structured Spring Boot applications, guiding them in discovering domain-driven modules, and verifying that the modular arrangement is correct. We'll also see how Spring Modulith assists with modular integration testing and documentation.

Most of the buzz around Generative AI has been how it is able to understand and respond to natural language prompts. But largely, those prompts have been typed in by a user and the responses have come back in textual form.

While humans often communicate with each other in a similar way via text messages and emails, natural interaction takes place across many modes of communication, including talking, hearing, seeing, and showing.

In this session, you'll see how to add sight and sound to your Spring AI applications. You'll learn how to build applications that can both talk and hear what your users say as “see” what your users show them (via images) and produce responses in graphic form.

The Spring Framework transformed enterprise Java development nearly two decades ago, making it easier to achieve common things such as transactions, security, loose-coupling, and much more Over the years, Spring has continued to rise to every challenge Java developers face, most recently addressing subjects such as reactive programming, cloud computing, and container deployment in Kubernetes. Meanwhile, Spring Boot makes easy work of Spring by employing (among other things) auto-configuration, runtime insight and management, and a practical convention for specifying application properties.

The releases of Spring Framework 6 and Spring Boot 3 bring exciting and useful new capabilities. With features like native compilation, improved observability and tracing, support for HTTP problem details, and declarative HTTP clients, as well as baselining on Java 17 and Jakarta EE 9, Spring is ready for a new generation of application development.

In this workshop, you'll start with a very simple Spring Boot application and learn to grow it into a fully functional application including a web front-end and data persistence. And you'll get hands-on experience with some of the most exciting new features in Spring 6 and Spring Boot 3.

Modern application observability involves tracking key metrics and tracing the flow of an application, even across service boundaries. Spring Boot 3 introduced some powerful metrics and tracing capabilities based on Micrometer to open a window into your application's inner-workings.

Among the things you might want to keep an eye on in your Generative AI applications are how many interactions and how much time is spent with vector stores and AI provider APIs and, of course, how many tokens are being spent by your application. And being able to trace the flow of prompts, data, and responses through your application can help identify problems and bottlenecks.

Great news! Spring AI comes equipped to record metrics and tracing information through Micrometer. In this session, you'll learn how to put Spring AI observability to work for you. You'll learn about the metrics it exposes as well as the keys you can use to build dashboards and tracing to build a window into your Generative AI applications.

As applications grow and become more complex, it's increasingly important to see what's going on inside. In this session, you'll learn how to put Micrometer and Spring's Actuator to work, enabling you to see, monitor, and take action on the internal activities of your Spring applications.

Historically, we've relied on application logs to understand what an application is doing, to measure its performance, and troubleshoot issues. Although logs can provide valuable insight, it only helps you see what happened in the past, not what's happening right now. And typically the most helpful log entries (those at DEBUG level) are disabled in a production application.

Modern application observability involves tracking key metrics and tracing the flow of an application, even across service boundaries. Spring Boot 3 introduced some powerful metrics and tracing capabilities based on Micrometer to open a window into your application's inner-workings.

In this session, we'll cover several useful prompt engineering techniques as well as some emerging patterns that are categorized within the “Agentic AI” space and see how to go beyond simple Q&A to turn your LLM of choice into a powerful ally in achieving your goals.

At it's core, Generative AI is about submitting a prompt to an LLM-backed API and getting some response back. But within that interaction there is a lot of nuance, particularly with regard to the prompt itself.

It's important to know how to write effective prompts, choosing the right wording and being clear about your expectations, to get the best responses from an LLM. This is often called “prompt engineering” and includes several patterns and techniques that have emerged in the Gen AI space.

In this example-driven presentation, we'll take a high-level look at how Spring applies reactive programming at all layers of an application. You'll also learn the essentials of working with Project Reactor, the reactive programming library for Java that Spring's reactive support builds upon.

Traditionally, applications have been built using a blocking, synchronous model. Although comfortable and intuitive for most programmers, this model doesn't scale well. And although there are several new approaches to reactive programming, they don't necessarily fit into the familiar programming model that Spring developers are accustomed to working with.

Spring 5 introduced a set of new reactive features, enabling non-blocking, asynchronous code that scales well using minimal threads. Moreover, it builds on the same concepts and programming models that Spring developers have used for years.

In this example-driven presentation, we'll focus on how to build reactive APIs in Spring. We'll start with Spring WebFlux, a reactive reimagining of the popular Spring MVC framework for HTTP-based APIs. Then we'll have a look at RSocket, an intriguing new communication protocol that is reactive by design.

Traditionally, applications have been built using a blocking, synchronous model. Although comfortable and intuitive for most programmers, this model doesn't scale well. And although there are several new approaches to reactive programming, they don't necessarily fit into the familiar programming model that Spring developers are accustomed to working with.

Spring 5 introduced a set of new reactive features, enabling non-blocking, asynchronous code that scales well using minimal threads. Moreover, it builds on the same concepts and programming models that Spring developers have used for years.

In this example-driven presentation, we'll focus on working with reactive data persistence. We'll start by seeing how to create reactive repositories for relational databases with Spring Data R2DBC. Then we'll explore non-relational reactive persistence for MongoDB and Cassandra.

Traditionally, applications have been built using a blocking, synchronous model. Although comfortable and intuitive for most programmers, this model doesn't scale well. And although there are several new approaches to reactive programming, they don't necessarily fit into the familiar programming model that Spring developers are accustomed to working with.

Spring 5 introduced a set of new reactive features, enabling non-blocking, asynchronous code that scales well using minimal threads. Moreover, it builds on the same concepts and programming models that Spring developers have used for years.

By now, you've no doubt noticed that Generative AI is making waves across many industries. In between all of the hype and doubt, there are several use cases for Generative AI in many software projects. Whether it be as simple as building a live chat to help your users or using AI to analyze data and provide recommendations, Generative AI is becoming a key piece of software architecture.

So how can you implement Generative AI in your projects? Let me introduce you to Spring AI.

For over two decades, the Spring Framework and its immense portfolio of projects has been making complex problems easy for Java developers. And now with the new Spring AI project, adding Generative AI to your Spring Boot projects couldn't be easier! Spring AI brings an AI client and templated prompting that handles all of the ceremony necessary to communicate with common AI APIs (such as OpenAI and Azure OpenAI). And with Spring Boot auto-configuration, you'll be able to get straight to the point of asking questions and getting answers your application needs.

In this session, we'll consider a handful of use cases for Generative AI and see how to implement them with Spring AI. We'll start simple, then build up to some more advanced uses of Spring AI that employ your application's own data when generating answers.

Spring and Kotlin: A match made in the JVM - Video Preview

In this session, we'll explore the combination of Spring and Kotlin, applying idiomatic Kotlin along with Spring's Kotlin extensions.

Spring has long been a framework that embraces simplicity and eschews unnecessary boilerplate and ceremony. Even so, Spring applications are commonly developed with Java which, as a language, demands a lot of boilerplate and ceremony. Although libraries such as Lombok help mitigate a lot of the unnecessary code, Lombok is sometimes viewed as a hack or “magic” that hides the ugly corners of Java.

Kotlin embraces simplicity and eschews unnecessary boilerplate and ceremony. Code written in Kotlin is much simpler and elegant than its Java equivalent, while remaining just as expressive.

It seems a natural fit to bring Spring and Kotlin together. In fact, Spring includes direct support for Kotlin, providing extensions that make writing Spring+Kotlin code a pleasant experience.

In this example-driven session, we're going to look at how to implement GraphQL in Spring. You'll learn how Spring for GraphQL builds upon GraphQL Java, recognize the use-cases that are best suited for GraphQL, and how to build a GraphQL API in Spring.

Typical REST APIs deal in resources. This is fine for many use cases, but it tends to be more rigid and less efficient in others.

For example, in an shopping API, it's important to weigh how much or how little information should be provided in a request for an order resource? Should the order resource contain only order specifics, but no details about the order's line items or the products in those line items? If all relevant details is included in the response, then it's breaking the boundaries of what the resource should offer and is overkill for clients that do not need it. On the other hand, proper factoring of the resource will require that the client make multiple requests to the API to fetch relevant information that they may need.

GraphQL offers a more flexible alternative to REST, setting aside the resource-oriented model and focusing more on what a client needs. Much as how SQL allows for data from multiple tables to be selected and joined in response to a query, GraphQL offers API clients the possibility of tailoring the response to provide all of the information needed and nothing that they do not need.

Although Java originally promised write once, run anywhere, it failed to fully deliver on that promise. As developers, we can develop, test, and build our applications into WAR or executable JAR files and then toss them over the wall to a Java application server and Java runtime that we have no control over, giving us zero confidence that the application will behave the same as when we tested it.

Containers fulfill the write-once, run anywhere promise that Java wasn't able to, by packaging the runtime and even the operating system along with our application, giving greater control and confidence that the application will function the same anywhere it is run. Additionally, containers afford several other benefits, including easy scaling, efficiency in terms of resource utilization, and security by isolating containers from their host system and from other containers.

While deploying Spring applications in containers has always been possible, Spring Boot makes it easier to containerize our applications and run them in container architectures such as Kubernetes. Spring Boot's support for containerization includes two options: Creating containers based on buildpacks or using layers as a means of modularizing and reducing the size of our application deployments. Moreover, new components in the Spring ecosystem can make your Spring applications Kubernetes-savvy so that they can take advantage of what a containerized architecture has to offer.

In this example-driven session, we're going to look at how to create and deploy Spring applications as container images and deploy them into a Kubernetes cluster. Along the way, we'll also get to know a few of the most useful tools that a Spring developer can employ in their development workflow when building containerized Spring applications. We'll also see how to apply patterns of Spring Cloud–such as configuration, service discovery, and gateways–using native Kubernetes facilities instead of Spring Cloud components. And we'll look at how components of the Spring ecosystem can work with your Spring applications to enable them to thrive in a Kubernetes cluster.

In this example-driven session, we'll review several tips and tricks to make the most out of your Spring development experience. You'll see how to apply the best features of Spring and Spring Boot, including the latest and greatest features of Spring Framework 6.x and Spring Boot 3.x with an eye to what's coming in Spring 7 and Boot 4.

Spring has been the de facto standard framework for Java development for nearly two decades. Over the years, Spring has continued to evolve and adapt to meet the ever-changing requirements of software development. And for nearly half that time, Spring Boot has carried Spring forward, capturing some of the best Spring patterns as auto-configuration.

As with any framework or language that has this much history and power, there are just as many ways to get it right as there are to get it wrong. How do you know that you are applying Spring in the best way in your application?

Books

Spring AI in Action

by Craig Walls

  • Generative AI tools like ChatGPT cause an immediate jaw drop for almost everyone who encounters them. Until recently, though, Java developers have had few good tools for adding AI features to existing and new applications. Spring AI, an exciting new extension for Spring and Spring Boot, changes the equation. Spring AI provides generative AI capabilities natively within the framework, so you can stick with Java end-to-end. Spring AI in Action shows you how!
  • A new edition of the classic bestseller! Spring in Action, 6th Edition covers all of the new features of Spring 5.3 and Spring Boot 2.4 along with examples of reactive programming, Spring Security for REST Services, and bringing reactivity to your databases. You'll also find the latest Spring best practices, including Spring Boot for application setup and configuration.
  • Voice recognition is here at last. Alexa and other voice assistants have now become widespread and mainstream. Is your app ready for voice interaction? Learn how to develop your own voice applications for Amazon Alexa. Start with techniques for building conversational user interfaces and dialog management. Integrate with existing applications and visual interfaces to complement voice-first applications. The future of human-computer interaction is voice, and we’ll help you get ready for it.
  • Spring Framework has been making Java developers more productive and successful for over a dozen years, and it shows no signs of slowing down!

    Spring in Action, 5th Edition is the fully-updated revision of Manning's bestselling Spring in Action. This new edition includes all Spring 5.0 updates, along with new examples on reactive programming, Spring WebFlux, and microservices. Readers will also find the latest Spring best practices, including Spring Boot for application setup and configuration.

    Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.