Win a copy of Java Challengers this week in the Java in General forum!

Lacko Rolnik

Greenhorn
+ Follow
since Apr 02, 2021
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Lacko Rolnik

I have made spring which accepts POST request with JSON data in body. I am getting deserialized List by sending ajax through my thymeleaf. (most of logic is javascript rest API, which I am consuming and passing further to Spring, currently after controller returns new html with extensionSearch I am loading new html in success branch of ajax function.)






I need make some sort of pagination with spring I have found some guide https://www.baeldung.com/spring-thymeleaf-pagination, but need to access my data in other classes like in guide BookService, I want create Service class for this purpose, where I would access this data from receiving controller. Can I in some way autowire this instance without storing it into database first? I have access to List<Issue> only from controller. I expect that in my @Service class I access these data from spring controller, and implement pagination. The Issue is implemented like record POJO with Java 15.

I have also splited first 10 issues rest, which I am sending through aformentioned @RequestMapping and then another rest for all other issues /receiveNextIssues, where I want implement pagination in Java and then in jquery after onclick call another rest for chosen page like /listIssues?page=5 like in guide.
1 month ago