프로필화면의 경우 따로 만들어서 진행하자.
/member/me 정도로 uri 진행 예정
질문과 답변의 경우
페이징 처리가 필요할듯하다.
자바 객체로써 questionList와 answerList가 존재함.
프로필화면 폼의 구성
member_me.html
시작은 나열하는폼
이 2가지의 경우 user안에 있기 때문에 현재는 먼저 틀과 기본만 진행하기 위해서 질문 먼저 진행하였다.
/user/me로 연결되는 내 정보의 경우 현재 로그인한 유저의 이름을 통해서 찾아오게 진행하였다.
@PreAuthorize("isAuthenticated()")
@GetMapping("/me")
public String me(Model model, Principal principal) {
    SiteUser user = userService.getUser(principal.getName());
    model.addAttribute("SiteUser", user);
    return "member_me";
}
<table class="table">
    <thead class="table-dark">
    <tr class="text-center">
        <th style="width:50%">제목</th>
        <th>글쓴이</th>
        <th>작성일시</th>
    </tr>
    </thead>
    <tbody>
    <tr class="text-center" th:each="question, loop:${SiteUser.questionList}">
        <td class="text-start">
            <a th:href="@{|/question/detail/${question.id}|}" th:text="${question.subject}"></a>
            <span class="text-danger small ms-2"
                  th:if="${#lists.size(question.answerList)>0}"
                  th:text="${#lists.size(question.answerList)}"></span>
        </td>
        <td><span th:text="${question.author.username}"></span></td>
        <td th:text="${#temporals.format(question.createDate, 'yyyy-MM-dd HH:mm')}"></td>
    </tr>
    </tbody>
</table>
다음은 내가 쓴 답변들을 추가하자.
<h3 class="text-center">내가 작성한 답변들</h3>
<table class="table">
    <thead class="table-dark">
    <tr class="text-center">
        <th style="width:50%">내용</th>
        <th>글쓴이</th>
        <th>작성일시</th>
    </tr>
    </thead>
    <tbody>
    <tr class="text-center" th:each="answer, loop:${SiteUser.answerList}">
        <td class="text-start">
            <a th:href="@{|/question/detail/${answer.question.id}|}" th:utext="${answer.content}"></a>
        </td>
        <td><span th:text="${answer.author.username}"></span></td>
        <td th:text="${#temporals.format(answer.createDate, 'yyyy-MM-dd HH:mm')}"></td>
    </tr>
    </tbody>
</table>

<div class="card" style="width: 18rem;">
    <div class="card-body">
        <h5 class="card-title">내 정보</h5>
        <p>유저 이름 :</p><p class="card-text" th:text="${SiteUser.username}"></p>
        <p>유저 이메일 : </p><p class="card-text" th:text="${SiteUser.email}"></p>
    </div>
</div>