java

jherrlin 2023-01-28T07:57:50.362699Z

Hey, We are using Kotlin/Java at work and often I would like to fire up a REPL and inspect some state in our service. Is it possible to start a Clojure REPL alongside Spring Boot?

mathpunk 2023-03-09T04:44:46.024739Z

@jherrlin I would also like to put a repl in Spring Boot. Is there anything you can share about doing that?

Tomas Brejla 2026-03-18T20:41:02.003969Z

Hi guys. A "bit" late to join your 2023 party 🥳, but it seems that Spring / JPA / Hibernate stack will stick with us to our last days 😅. So FYI: there was this nice article by Jakub Holy from 2019 https://engineering.telia.no/blog/java-troubleshooting-on-steroids-with-clojure-repl, showcasing the integration you were discussing. Inspired by that article (& really nice flow using clojure nrepl + clojure-mcp + LLM agent), last week I created Livewire: https://brdloush.github.io/livewire/ It's a spring (boot) - aware embedded REPL I always wished to have, but never bothered to invest time to build it from scratch 🙂 • It primarily started (and is continuing to be) as an experiment figuring out "how far can you get without restarting". And live inspection. And who knows what else. • So far, I'm really pleased by the result 🎉 • Agents these days are quite clever and given "new toys to play with", they immediately start using them in very interesting ways. ◦ Biggest impact: agents start to test their own theories and hypotheses by writing and evaluating temporary clojure code. You can even choose "No.. and tell them to test their hypotheses in REPL before writing the final code.". They will. ◦ Even if you ask them a totally random question like "is query behind this endpoint an efficient one when it comes to DB indexes", they will figure out a way to query that database with explain or explain analyze. Even if you don't feed them a livewire repl, they will do their best to access that DB of yours. ◦ Always think about what you're accepting. Consider if you can allow that agent to see the data it's accessing, commenting and using. You have been warned 🙂

jherrlin 2023-03-09T08:06:03.769929Z

@mathpunk I havent had the time to do anything yet so atm I have nothing to share

🆒 1
emccue 2023-01-28T18:22:56.531389Z

It is. Include the clojure jar + nrepl jar and start an nrepl server with interop

emccue 2023-01-28T18:23:40.642749Z

There would be more steps to actually poke at the state in spring, but idk what they would be

jherrlin 2023-01-28T18:23:58.045829Z

Nice! Is it straight forward? Do you have examples?

emccue 2023-01-28T18:24:14.665609Z

Eh, sorta? And no

emccue 2023-01-28T18:24:23.852279Z

I have some examples of interop

emccue 2023-01-28T18:24:31.939579Z

But not doing that specifically

jherrlin 2023-01-28T18:24:42.411889Z

Yeah I am a bit afraid that Spring will hide stuff for me. Time will tell

jherrlin 2023-01-28T18:24:55.235819Z

Thx! I figure it out