Canonical URL: Republished from munonye.com. Full code on GitHub.
This Ollama Spring Boot tutorial runs local LLMs with no OpenAI bill — ideal for development and air-gapped environments. Part of AI Developer Tutorials.
Install Ollama
curl -fsSL https://ollama.com/install.sh | sh
ollama pull llama3.2
ollama serve
Spring configuration
Replace OpenAI starter with:
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-ollama-spring-boot-starter</artifactId>
</dependency>
spring.ai.ollama.base-url=http://localhost:11434
spring.ai.ollama.chat.options.model=llama3.2
Your M7-A ChatController works unchanged.
Next: Angular signals for chat state (M10-B)
Full tutorial: Run Local LLMs with Ollama + Spring Boot REST API (2026)
Top comments (0)