Category Archives: REstful

Integrating Spring AI Framework in Your Java Application

This blog post will integrate the Spring AI framework into a Java application. We’ll use a simple project that includes a ChatService and a ChatController to demonstrate using the Spring AI framework to generate text & image responses and horoscopes based on user input.

Continue reading

Using Spring Boot to invoke ChatGPT/OpenAI API

OpenAI provides us the ability to invoke its features via RESTful APIs. This blog shows how to invoke the API using Spring Boot. There is nothing special here and no OpenAI Java libraries that I use. One can do the same in standard Java (non-spring) or even in more concise code with Nodejs. But here goes a sample with Spring Boot.

Continue reading

Sparkjava & JDBI

Once you spend a lot of time with a set of tools there is a tendency to come up with solutions to every problem with just those tools. This narrow tunnel vision is dangerous for a techie since you can be completely blindsided when something new comes up and you are found lacking in new skills. It also inhibits the ability to learn new things and take in new ideas. Having spent a lot of time in the Java Spring tunnel, it was a welcome break for me to try out SparkJava & JDBI recently – void of any Spring, JEE or IoC.

Continue reading