嗨,我在我的存储库域中有很多重复的代码,例如 public CommonModel GetLocations(IModelWithCurrentUser<xyz> model) var sqlParametersvar result = _queryExecutor.QueryWithOutputParameters<Locations>(PermissionsQueries.GetLocations, sqlParameters如下所示: public CommonModel GetS
我们的应用程序使用Spring框架的来执行各种JDBC语句。该类中的大多数方法都是重载的。例如,update()的一个版本接受Map,其中键是绑定变量名,值是变量替换。另一个版本接受SqlParameterSource,它也允许提供列类型信息。我想写一条使用Map标记的规则,因为如果您想避免在重载下出现问题,可以提供类型信息。public int updateTheThing(final Integer thingId, final Integer s