gpt4 book ai didi

spring - Spring Boot 的 Grails 控制台是什么?

转载 作者:行者123 更新时间:2023-12-01 04:50:31 25 4
gpt4 key购买 nike

我最近开始在 Spring Boot 上花费更多的时间,并且开始感觉没有像应用程序这样的 shell(类似于 Grails 控制台),我可以使用存储库、服务等......在 spring boot 中是否存在这样的东西?

最佳答案

我最近推出了Spring Context from Groovy项目,它使您可以访问 Remote Shell 中的所有 bean 对象插件使用 repl groovy交互式控制台。

看起来像这样:

$ ssh -p 2000 user@localhost
user@localhost's password:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.4.6.RELEASE) on myhost
> repl groovy
Using repl groovy
> ctx.App.myUserService.findUserByEmail("mrsarm@gmail.com")[0].id
100123
> ctx.App.myUserService.getById(100123).name
Mariano Ruiz
> ctx.App.contactDao.logger.effectiveLevel
INFO
> ctx.App.contactDao.logger.setLevel(ch.qos.logback.classic.Level.DEBUG)

关于spring - Spring Boot 的 Grails 控制台是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41606489/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com