我想写一个打印命令的bash脚本.但出于可读性目的,我不希望它打印echo命令.不幸的是,我找不到正确的bash脚本设置来实现这一点.我需要帮助?
#!/bin/bash
# Makes the bash script to print out every command before it is executed
set -v
echo "Cleaning test database"
RAILS_ENV=test bundle exec rake db:drop
echo "************************************************************"
echo ""
echo "Setting up the test database"
RAILS_ENV=test bundle exec rake db:setup
echo "************************************************************"
echo ""
Run Code Online (Sandbox Code Playgroud)
输出如下:
echo "Cleaning test database"
Cleaning test database
RAILS_ENV=test bundle exec rake db:drop
echo "************************************************************"
************************************************************
echo ""
echo "Setting up the test database"
Setting up the test database
RAILS_ENV=test bundle exec rake db:setup …Run Code Online (Sandbox Code Playgroud) 我正在使用带有@EnableZuulProxy注释的 Spring Boot 应用程序。但我想在运行时添加自定义路由。这怎么可能?
现有文档仅显示静态示例,其中路由在application.yml. 您能否指出我的用例的代码片段。
在ZuulConfiguration我发现添加路由的可能性,routeLocator().getRoutes().add(route);但它们不适用于运行时。我错过了什么?
非常感谢。干杯
杰拉尔多