sonar-intellij-plugin icon indicating copy to clipboard operation
sonar-intellij-plugin copied to clipboard

fix: 更新SonarApi 路径为相对路径,解决baseUrl包含二级目录时的空异常

Open zhengxiaosong opened this issue 2 years ago • 0 comments

根据retrofit2定义,@GET("/api/execute")会作为绝对路径处理,如果baseUrl为 https://example.com/sonar/, 那么完整地址会变为 https://example.com/api/execute。 如果需要保持子路径作为BaseUrl,那么需要采用相对路径 @GET("api/execute"),这样retrofit2会处理为https://example.com/sonar/api/execute

zhengxiaosong avatar Aug 18 '23 05:08 zhengxiaosong