У меня есть этот код, но мой вывод в браузере не тот, который я хочу
@GetMapping(path = "/all")
public @ResponseBody List<User> getAllUsers() {
return userRepository.findAll();
}
Вывод:
[{"id":4,"firstName":"busayo","lastName":"amowe","email":"amoweolubusayo@gmail.com","password":"$2a$10$09kGDhlEp.Xmj0ocDjGLTO.03z.kGQKm2ZHcsNetDpH0r6m1rkVIu","roles":[{"id":1,"name":"ROLE_ADMIN","users":[{"id":4,"firstName":"busayo","lastName":"amowe","email":"amoweolubusayo@gmail.com","password":"$2a$10$09kGDhlEp.Xmj0ocDjGLTO.03z.kGQKm2ZHcsNetDpH0r6m1rkVIu","roles":[{"id":1,"name":"ROLE_ADMIN","users":[{"id":4,"firstName":"busayo","lastName":"amowe","email":"amoweolubusayo@gmail.com","password":"$2a$10$09kGDhlEp.Xmj0ocDjGLTO.03z.kGQKm2ZHcsNetDpH0r6m1rkVIu","roles":[{"id":1,"name":"ROLE_ADMIN","users":[{"id":4,"firstName":"busayo","lastName":"amowe","email":"amoweolubusayo@gmail.com","password":"$2a$10$09kGDhlEp.Xmj0ocDjGLTO.03z.kGQKm2ZHcsNetDpH0r6m1rkVIu","roles":[{"id":1,"name":"ROLE_ADMIN","users":[{"id":4,"firstName":"busayo","lastName":"amowe","email":"amoweolubusayo@gmail.com","password":"$2a$10$09kGDhlEp.Xmj0ocDjGLTO.03z.kGQKm2ZHcsNetDpH0r6m1rkVIu","roles":[{"id":1,"name":"ROLE_ADMIN","users":[{"id":4,"firstName":"busayo","lastName":"amowe","email":"amoweolubusayo@gmail.com","password":"$2a$10$09kGDhlEp.Xmj0ocDjGLTO.03z.kGQKm2ZHcsNetDpH0r6m1rkVIu","roles":[{"id":1,"name":"ROLE_ADMIN","users":[{"id":4,"firstName":"busayo","lastName":"amowe","email":"amoweolubusayo@gmail.com","password":"$2a$10$09kGDhlEp.Xmj0ocDjGLTO.03z.kGQKm2ZHcsNetDpH0r6m1rkVIu","roles":[{"id":1,"name":"ROLE_ADMIN","users":[{"id":4,"firstName":"busayo","lastName":"amowe","email":"amoweolubusayo@gmail.com","password":"$2a$10$09kGDhlEp.Xmj0ocDjGLTO.03z.kGQKm2ZHcsNetDpH0r6m1rkVIu","roles":[{"id":1,"name":"ROLE_ADMIN","users":[{"id":4,"firstName":"busayo","lastName":"amowe","email":"amoweolubusayo@gmail.com","password":"$2a$10$09kGDhlEp.Xmj0ocDjGLTO.03z.kGQKm2ZHcsNetDpH0r6m1rkVIu","roles":[{"id":1,"name":"ROLE_ADMIN","users":[{"id":4,"firstName":"busayo","lastName":"amowe","email":"amoweolubusayo@gmail.com","password":"$2a$10$09kGDhlEp.Xmj0ocDjGLTO.03z.kGQKm2ZHcsNetDpH0r6m1rkVIu","roles":[{"id":1,"name":"ROLE_ADMIN","users":[{"id":4,"firstName":"busayo","lastName":"amowe","email":"amoweolubusayo@gmail.com","password":"$2a$10$09kGDhlEp.Xmj0ocDjGLTO.03z.kGQKm2ZHcsNetDpH0r6m1rkVIu","roles":[{"id":1,"name":"ROLE_ADMIN","users":[{"id":4,"firstName":"busayo","lastName":"amowe","email":"amoweolubusayo@gmail.com","password":"$2a$10$09kGDhlEp.Xmj0ocDjGLTO.03z.kGQKm2ZHcsNetDpH0r6m1rkVIu","roles":[{"id":1,"name":"ROLE_ADMIN","users":[{"id":4,"firstName":"busayo","lastName":"amowe","email":"amoweolubusayo@gmail.com","password":"$2a$10$09kGDhlEp.Xmj0ocDjGLTO.03z.kGQKm2ZHcsNetDpH0r6m1rkVIu","roles":[{"id":1,"name":"ROLE_ADMIN","users":[{"id":4,"firstName":"busayo","lastName":"amowe","email":"amoweolubusayo@gmail.com","password":"$2a$10$09kGDhlEp.Xmj0ocDjGLTO.03z.kGQKm2ZHcsNetDpH0r6m1rkVIu","roles":[{"id":1,"name":"ROLE_ADMIN","users"
Разве он не должен быть напечатан один раз?Он говорит, что ошибка StackOverFlow и моя функция getJson не может ее отобразить.Что я могу сделать?