I am trying to mimic this:

I have 3 controllers, services, repos, etc.
Mood, Stress and Пользователь.
Код: Выделить всё
@Repository
public interface MoodRepository extends CrudRepository {
@Query("""
SELECT DISTINCT u.name, u.userName, m.mood, s.stress, m.date as MOOD_DATE, s.date AS STRESS_DATE FROM User u JOIN Mood m ON u.id = m.userId JOIN Stress s ON u.id = s.userId""")
List badDayReport();
}
< /code>
Я могу создать и запустить приложение, но когда я нажимаю на API, я получаю следующее в консоли: < /p>
hibernate: выберите Disful
U1_0.name,u1_0.user_name,m1_0.mood,S1_0.stress,m1_0.date,S1_0.date
от пользователей u1_0 присоединяется к настроению m1_0 на u1_0.id = m1_0.user_id uniab u1_0.id = s1_0.user_id < /p>
< /blockquote>
почтальон никогда не завершается.@Getter
@Setter
@NoArgsConstructor
public class BadDayResponse implements Serializable {
private Date moodDate;
private Date stressDate;
private String name;
private String userName;
private int mood;
private int stress;
BadDayResponse(String name, String userName, int mood, int stress, Date moodDate, Date stressDate) {
this.name = name;
this.userName = userName;
this.mood = mood;
this.stress = stress;
this.moodDate = moodDate;
this.stressDate = stressDate;
}
}
Любые указатели/справка/советы? Описание здесь "src =" https://i.sstatic.net/5luqp0ho.png "/>
Подробнее здесь: https://stackoverflow.com/questions/795 ... g-api-call