Stack Exchange
spring jpa query is returning 404 no message
I'm trying to get data of a user in a range, so here is the method implemented in my JPA repository, to get the list of data in between a range :
@Query("select datum from Datum datum where datum.timeStamp between ?1 and ?2")
    public List<Datum> findUsingTime(LocalDateTime floor,LocalDateTime ceiling);

And in controller, I have written :
@GetMapping("/datum/{userID}/{timeStamp}")
    List<Datum> getDataSingleUserTimeRange(@PathVariable Long userID, @PathVariable String timeStamp)
    {
        System.out.println(timeStamp);
        //Y2019M12D15H20M04S19
        String[] splits=timeStamp.replaceAll( "[^\\d,]", "," ).split(",");
        int year = Integer.valueOf(splits[0]);
        int month = Integer.valueOf(splits[1]);
        int day = Integer.valueOf(splits[2]);
        int hour = Integer.valueOf(splits[3]);
        int minute = Integer.valueOf(splits[4]);
        int second = Integer.valueOf(splits[5]);
        LocalDateTime roundFloor =  LocalDateTime.of(year,month,day,hour,minute,second);
        LocalDateTime roundCeiling =  LocalDateTime.of(year,month,day,hour,minute,second+1);
        System.out.println(roundFloor);
        System.out.println(roundCeiling);
        return datumRepository.findUsingTime(roundFloor,roundCeiling);
    }

But whenever I call this resting api, it gives me error 404, without any message.
How can I resolve this ?

could you specify the full request URL that you're using

@mangusta , this problem has been solved, see here
