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

标签 spring grails spring-boot

我最近开始在 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/

相关文章:

java - 如何使用java在tomcat webapps文件夹外读写图像

spring - 通过 HTTP 服务 PostgreSQL 大对象

hibernate - grails 3(spring-boot)-如何配置 hibernate 二级缓存

java - Spring Security如何检索用户名

grails - Grails自定义消息不起作用

html - 在XHTML文档的grails中使用JSOUP获取两个不同标签之间的文本

java - 只允许预定义包中的类调用构造函数/方法?

java - TestNG 测试不使用 TestPropertySource 来注入(inject) @Value

java - 部署到 Heroku 的 Spring Boot 应用程序找不到它的“thymeleaf View ”

java - @Value 中的 SpEL 重构(加密属性)