Static methods cannot use dependency injection. This is because the idea of dependency injection (at least to Nest) is to inject instances of the dependencies so that they can be leveraged later.
The code you have is valid, in that it will return the value 1
like the static method says to, but the static method cannot use any of the instance values that are injected. You'll find this kind of logic follows in most other DI frameworks.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…