java - Spring Boot 2.0 Gradle run and test in IntelliJ
问题描述
I have a simple Spring Boot 2 application with Gradle as build system. Everything runs fine as long as I use Gradle to run and test the project.
One controller class contain an @Autowire
d bean
@Autowired
OAuth2AuthorizedClientService clientService
which works quite ok.
The problem is, when I try to run the application in IntelliJ IDEA through a right-click on the application class or if I start my test suite, the system complains that the above mentioned bean is missing.
Just referencing the bean without declaring it seems to be a standard pattern...
Any hint on where I could look for a solution?
解决方案
推荐阅读
- python - 计算用户的时间增量
- python-3.x - 批量标准化在 tensorflow 2.0 中没有梯度?
- typescript - 类型不匹配?“...缺少类型...中的以下属性”
- html - 每次修改时都需要制作一个新的css版本
- swift - 如何使用不是主线程的线程等到类静态 Bool 变量为真?
- haskell - 规范化 TypeNats 不等式
- javascript - 如何使 HTML 元素仅在鼠标悬停时跟随光标,否则不跟随?
- javascript - 有没有办法可以在两者之间延迟:this.bullets.push(this.ship.shoot());
- php - laravel 5如何将数据插入3-4个模型中的多对一关系
- powershell - 使用 PowerShell 每 5 分钟创建一个文件的备份副本