0

春が始まるとExampleすべてがうまくいきますがExample、結果は空です

アプリケーション.java

@SpringBootApplication
public class SelkinApplication {

    public static void main(String[] args) {
        SpringApplication.run(SelkinApplication.class, args);
    }
}

SvHistoryRep.java

public interface SvHistoryRep extends CrudRepository<SvHistory, Integer>, QueryByExampleExecutor<SvHistory> {

}

Service.java

    @PostMapping(path = "getFilteredHistory")
    public @ResponseBody void getFilteredHistory(@RequestBody SvHistory svHistory){

        SvHistory history = new SvHistory();
        history.setJobStatusId(1);
        Example<SvHistory> example = Example.of(history);
        svHistoryRep.findAll(example).forEach(System.out::println);

    }

例がなければ仕事です。svHistoryRep.findAll().forEach(System.out::println);

しかし、例では、空の結果があります

4

1 に答える 1