sea

Results 3 issues of sea

//db.properties ``` password=adc^9So%oTXP ``` //DbConfig.java ```java import org.aeonbits.owner.Config; @Config.Sources({"classpath:config/db.properties"}) public interface DbConfig extends Config { String password(); } ``` //Demo.java ```java ... DbConfig config = ConfigFactory.create(DbConfig.class); String pwd = config.password();...

看`pika-port/README.md`第34行得知,文件`pika-port/build3.sh`的执行目录,应该是`pika-port`这个文件夹,如图: ![image](https://user-images.githubusercontent.com/12644274/149856833-48385877-9fc9-46f5-bdac-14bcccc569d5.png) 但执行时却提示`You need to run this command from the toplevel of the working tree.`,如果在顶层目录执行,又与文件`pika-port/build3.sh`第33行不符,如图: ![image](https://user-images.githubusercontent.com/12644274/149856791-5246b231-ae38-4e6f-a311-77d32cd2625f.png) 请问,这里是不是有问题,但无论在哪个目录,总不编译不通过 把`cd pika_port_3`改成`cd pika-port/pika_port_3`,在顶层目录执行也出错,如图: ![image](https://user-images.githubusercontent.com/12644274/149863089-7dba4369-4cbe-4964-bf09-d6c97713433a.png) 不改,在所在目录直接执行`sh build3.sh`还是报错,如图: ![image](https://user-images.githubusercontent.com/12644274/149863870-c969a7ad-f719-4dcb-9c30-177ecf089b3d.png) 请问,是什么原因?到底应该在哪个目录执行?还有`pika-port/glog.sh`这个文件有什么作用?感谢!

读源代码(版本:`1.8.2` )时, `com.alibaba.csp.sentinel.context.ContextUtil` 提供有 `initDefaultContext()` 方法,并在 `static` 块中初始化了一个`sentinel_default_context`,位置如图: ![image](https://user-images.githubusercontent.com/12644274/202660038-9a6c1f77-fe4f-491e-9bf3-978cd410c71f.png) 在测试过程中,有三个不同的场景,如图: ![image](https://user-images.githubusercontent.com/12644274/202672422-d4ec6740-3581-4216-a417-ea4dd8325bdd.png) 说明: 场景 **①** 是 `main` 方法直接跑的,生成了默认的 `sentinel_default_context` 场景 **②** 是 `web` 应用,使用了 `com.alibaba.csp.sentinel.adapter.spring.webmvc.SentinelWebInterceptor`, 生成了默认的 `sentinel_default_context` 和 `sentinel_spring_web_context` 场景 **③**...

kind/question