Use AI models in Java the way you already use databases. Spring AI gives you one API for chat models, embeddings, vector stores and tools, and swaps the provider with a property. This book teaches it by building, not by listing features: thirteen chapters, seventeen complete Spring Boot projects, and every program run on a free local model and on a paid cloud model before a word was written about it. What you buildA support desk that streams its replies, and a router that falls back to a local model when the cloud call failsAn invoice parser that returns Java records, with the numbers checked in plain JavaA duplicate-ticket detector using embeddings and cosine similarity, with no vector database at allSemantic search over a product catalogue on PostgreSQL with pgvectorQuestion answering over your own PDFs, including why chunk size decides answer qualityAn order assistant that queries a database and calls a live web API, with an approval gateAn MCP server that offers your application's tools to other AI applicationsA four-layer test suite for answers that change on every runToken, cost and latency accounting per feature, and a production checklistWritten against a verified stack Spring AI 2.0.1, Spring Boot 4.1.1, Java 21. Every version number, error message and measurement in this book came from running the code, not from documentation. When the official examples did not compile, the book says so and shows what does. Also includedAppendix A: 113 gotchas by topic, with the exact error text, so you can search for the message on your screenAn index, and a complete Maven project per chapter that opens in IntelliJ and runs with nothing but an API key, or nothing at all on a local modelWho it is for Java and Spring Boot developers. No machine-learning background needed.
ThriftBooks sells millions of used books at the lowest everyday prices. We personally assess every book's quality and offer rare, out-of-print treasures. We deliver the joy of reading in recyclable packaging with free standard shipping on US orders over $15. ThriftBooks.com. Read more. Spend less.