<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>todyDev</title>
    <link>https://to-dy.tistory.com/</link>
    <description>꿈꾸는 개발자</description>
    <language>ko</language>
    <pubDate>Tue, 30 Jun 2026 11:55:28 +0900</pubDate>
    <generator>TISTORY</generator>
    <ttl>100</ttl>
    <managingEditor>#에게</managingEditor>
    <item>
      <title>Spring 개발 - 게시판 만들기 #첨부파일 수정 및 삭제</title>
      <link>https://to-dy.tistory.com/102</link>
      <description>&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;게시판의 글을 수정하고 삭제하는 것처럼 게시글에 포함된 첨부파일도 수정, 삭제를 할 수 있게 만들어 주자.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2 data-ke-size=&quot;size26&quot;&gt;1. 수정 페이지에 파일 정보 가져오기&lt;/h2&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;수정 페이지에 게시글의 정보와 함께 등록된 파일의 정보들도 같이 가져오자. 기존의 수정 페이지의 로직에서 파일의 정보를 가져오는 로직을 추가하여 수정 페이지에 정보를 던져주었다.&lt;/p&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color: #010101; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position: relative !important; overflow: auto;&quot;&gt;
&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin: 0; padding: 0; border: none; background-color: #fafafa; border-radius: 4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 6px; border-right: 2px solid #e5e5e5;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; word-break: normal; text-align: right; color: #666; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;1&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;2&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;3&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;4&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;5&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;6&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;7&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;8&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;9&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;10&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;11&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;12&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;13&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;14&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;15&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;16&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;17&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;18&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;19&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;20&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;21&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;22&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;23&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;24&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;25&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;26&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;27&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;28&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;29&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;30&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;31&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;32&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;33&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;34&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;35&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;36&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;37&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;38&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;39&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;40&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;41&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;42&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;43&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;44&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;45&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;46&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;47&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;48&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;padding: 6px 0; text-align: left;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; color: #010101; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #999999;&quot;&gt;// BoardController (GET)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;@RequestMapping(value&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #63a35c;&quot;&gt;&quot;/board/boardUpdate&quot;&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;public&lt;/span&gt;&amp;nbsp;ModelAndView&amp;nbsp;boardUpdate(CommandMap&amp;nbsp;commandMap,&amp;nbsp;Criteria&amp;nbsp;cri)&amp;nbsp;&lt;span style=&quot;color: #a71d5d;&quot;&gt;throws&lt;/span&gt;&amp;nbsp;Exception&amp;nbsp;{&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ModelAndView&amp;nbsp;mv&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #a71d5d;&quot;&gt;new&lt;/span&gt;&amp;nbsp;ModelAndView(&lt;span style=&quot;color: #63a35c;&quot;&gt;&quot;/board/boardUpdate&quot;&lt;/span&gt;);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Map&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;detail&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;=&lt;/span&gt;&amp;nbsp;boardService.selectBoardDetail(commandMap.getMap());&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;List&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;lt;&lt;/span&gt;Map&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;file&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;=&lt;/span&gt;&amp;nbsp;boardService.selectBoardFileDetail(commandMap.getMap());&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mv.addObject(&lt;span style=&quot;color: #63a35c;&quot;&gt;&quot;detail&quot;&lt;/span&gt;,detail);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mv.addObject(&lt;span style=&quot;color: #63a35c;&quot;&gt;&quot;file&quot;&lt;/span&gt;,&amp;nbsp;file);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PageMaker&amp;nbsp;pageMaker&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #a71d5d;&quot;&gt;new&lt;/span&gt;&amp;nbsp;PageMaker();&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;pageMaker.setCri(cri);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mv.addObject(&lt;span style=&quot;color: #63a35c;&quot;&gt;&quot;page&quot;&lt;/span&gt;,cri.getPage());&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mv.addObject(&lt;span style=&quot;color: #63a35c;&quot;&gt;&quot;pageMaker&quot;&lt;/span&gt;,&amp;nbsp;pageMaker);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #a71d5d;&quot;&gt;return&lt;/span&gt;&amp;nbsp;mv;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;}&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #999999;&quot;&gt;//&amp;nbsp;BoardService&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;List&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;lt;&lt;/span&gt;Map&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;selectBoardFileDetail(Map&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;map);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #999999;&quot;&gt;//&amp;nbsp;BoardServiceImpl&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;@Override&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;public&lt;/span&gt;&amp;nbsp;List&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;lt;&lt;/span&gt;Map&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;selectBoardFileDetail(Map&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;map)&amp;nbsp;{&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #999999;&quot;&gt;//&amp;nbsp;TODO&amp;nbsp;Auto-generated&amp;nbsp;method&amp;nbsp;stub&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #a71d5d;&quot;&gt;return&lt;/span&gt;&amp;nbsp;boardDAO.detailFile(map);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;}&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #999999;&quot;&gt;//&amp;nbsp;BoardDAO&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;@SuppressWarnings(&lt;span style=&quot;color: #63a35c;&quot;&gt;&quot;unchecked&quot;&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;public&lt;/span&gt;&amp;nbsp;List&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;lt;&lt;/span&gt;Map&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;detailFile(Map&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;map)&amp;nbsp;{&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #a71d5d;&quot;&gt;return&lt;/span&gt;&amp;nbsp;selectList(&lt;span style=&quot;color: #63a35c;&quot;&gt;&quot;board.detailFile&quot;&lt;/span&gt;,&amp;nbsp;map);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;}&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #999999;&quot;&gt;//&amp;nbsp;SQL&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;lt;&lt;/span&gt;select&amp;nbsp;id&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #63a35c;&quot;&gt;&quot;selectFileInfo&quot;&lt;/span&gt;&amp;nbsp;parameterType&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #63a35c;&quot;&gt;&quot;hashmap&quot;&lt;/span&gt;&amp;nbsp;resultType&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #63a35c;&quot;&gt;&quot;hashmap&quot;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;!&lt;/span&gt;[CDATA[&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SELECT&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;IDX,&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;BOARD_IDX,&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ORG_FILE_NAME,&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SAVE_FILE_NAME&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FROM&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;tb_file&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;WHERE&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;IDX&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;=&lt;/span&gt;&amp;nbsp;#{&amp;nbsp;IDX}&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;]]&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;/&lt;/span&gt;select&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: right; margin-top: -13px; margin-right: 5px; font-size: 9px; font-style: italic;&quot;&gt;&lt;a style=&quot;color: #e5e5e5text-decoration:none;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;vertical-align: bottom; padding: 0 2px 4px 0;&quot;&gt;&lt;a style=&quot;text-decoration: none; color: white;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: #e5e5e5; color: white; border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;7, 9행처럼 controller 에서 파일 정보를 가져오는 로직을 추가하여 servcie 영역을 추가하였고, dao, sql 영역은 상세 페이지에서 사용하던 기존 로직을 그대로 사용했다. 나처럼 controller 영역에서 file 정보를 가져오는 방법을 사용했지만, service 영역에서 file 정보를 가져오는 방법을 사용해도 된다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2 data-ke-size=&quot;size26&quot;&gt;2. 수정 페이지에 파일 정보 보여주기&lt;/h2&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;수정 페이지에서 등록된 파일을 보여주고 삭제 버튼을 추가할 것이다. 그리고 기존 파일 삭제 뿐만 아니라 새로운 파일을 추가할 수 있어야 되기 때문에 등록 페이지에 있는 파일 추가하는 로직도 그대로 들고 왔다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size18&quot;&gt;- boardUpdate.jsp&lt;/p&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color: #010101; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position: relative !important; overflow: auto;&quot;&gt;
&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin: 0; padding: 0; border: none; background-color: #fafafa; border-radius: 4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 6px; border-right: 2px solid #e5e5e5;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; word-break: normal; text-align: right; color: #666; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;1&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;2&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;3&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;4&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;5&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;6&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;7&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;8&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;9&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;10&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;11&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;12&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;13&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;14&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;15&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;16&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;17&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;18&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;19&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;20&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;21&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;22&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;23&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;24&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;25&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;26&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;27&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;28&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;29&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;30&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;31&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;32&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;33&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;34&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;35&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;36&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;37&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;38&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;39&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;40&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;padding: 6px 0; text-align: left;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; color: #010101; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;%@&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;taglib&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;prefix&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;c&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;uri&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;http://java.sun.com/jsp/jstl/core&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;%&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;form&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;action&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;'&amp;lt;c:url&amp;nbsp;value='&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;/board/boardUpdate${pageMaker.makeQueryPage(page)&lt;/span&gt;&amp;nbsp;}&lt;span style=&quot;color: #df5000;&quot;&gt;'/&amp;gt;'&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;method&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;post&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;enctype&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;multipart/form-data&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;div&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;form-group&amp;nbsp;file-group&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;file-list&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;div&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;file-add&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;a&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;href&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;#this&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;onclick&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;addFile()&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;span&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;glyphicon&amp;nbsp;glyphicon-plus&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;aria-hidden&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;true&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;span&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;파일추가&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;c:forEach&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;items&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;${file&amp;nbsp;}&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;var&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;file&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;div&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;file-input&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;span&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;glyphicon&amp;nbsp;glyphicon-camera&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;aria-hidden&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;true&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;span&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;${file.ORG_FILE_NAME&amp;nbsp;}&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;span&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;${file.FILE_SIZE&amp;nbsp;}kb&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;span&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;a&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;href&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;'#this'&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;'file-delete'&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;삭제&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;c:forEach&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;form&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;script&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;text/javascript&quot;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color: #066de2;&quot;&gt;document&lt;/span&gt;).ready(&lt;span style=&quot;color: #a71d5d;&quot;&gt;function&lt;/span&gt;()&amp;nbsp;{&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color: #63a35c;&quot;&gt;&quot;a[name='file-delete']&quot;&lt;/span&gt;).on(&lt;span style=&quot;color: #63a35c;&quot;&gt;&quot;click&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a71d5d;&quot;&gt;function&lt;/span&gt;(e)&amp;nbsp;{&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;e.preventDefault();&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;deleteFile($(&lt;span style=&quot;color: #066de2;&quot;&gt;this&lt;/span&gt;));&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;})&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #a71d5d;&quot;&gt;function&lt;/span&gt;&amp;nbsp;addFile()&amp;nbsp;{&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #a71d5d;&quot;&gt;var&lt;/span&gt;&amp;nbsp;str&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #63a35c;&quot;&gt;&quot;&amp;lt;div&amp;nbsp;class='file-input'&amp;gt;&amp;lt;input&amp;nbsp;type='file'&amp;nbsp;name='file'&amp;gt;&amp;lt;a&amp;nbsp;href='#this'&amp;nbsp;name='file-delete'&amp;gt;삭제&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&quot;&lt;/span&gt;;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color: #63a35c;&quot;&gt;&quot;#file-list&quot;&lt;/span&gt;).append(str);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color: #63a35c;&quot;&gt;&quot;a[name='file-delete']&quot;&lt;/span&gt;).on(&lt;span style=&quot;color: #63a35c;&quot;&gt;&quot;click&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a71d5d;&quot;&gt;function&lt;/span&gt;(e)&amp;nbsp;{&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;e.preventDefault();&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;deleteFile($(&lt;span style=&quot;color: #066de2;&quot;&gt;this&lt;/span&gt;));&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #a71d5d;&quot;&gt;function&lt;/span&gt;&amp;nbsp;deleteFile(obj)&amp;nbsp;{&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;obj.&lt;span style=&quot;color: #066de2;&quot;&gt;parent&lt;/span&gt;().remove();&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: right; margin-top: -13px; margin-right: 5px; font-size: 9px; font-style: italic;&quot;&gt;&lt;a style=&quot;color: #e5e5e5text-decoration:none;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;vertical-align: bottom; padding: 0 2px 4px 0;&quot;&gt;&lt;a style=&quot;text-decoration: none; color: white;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: #e5e5e5; color: white; border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;수정 페이지에서도 새로운 파일을 보내야하기 때문에 3행처럼 반드시 form 태그에 &lt;b&gt;enctype=&quot;multipart/form-data&quot;&lt;/b&gt; 넣어야 한다. 그리고 스크립트 영역은&amp;nbsp;&lt;a href=&quot;https://to-dy.tistory.com/95&quot;&gt;파일 업로드&lt;/a&gt;에서 사용했던 로직을 그대로 가지고 왔다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;이렇게 작업하고 실행을 하면 아래와 같이 수정 페이지에서 등록된 파일 정보들도 함께 보이게 된다.&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;imageblock alignLeft&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;875&quot; data-origin-height=&quot;755&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/bAW8OY/btrnc2XdY0x/yeJAQupMUc1u5cabpTB2d1/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/bAW8OY/btrnc2XdY0x/yeJAQupMUc1u5cabpTB2d1/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/bAW8OY/btrnc2XdY0x/yeJAQupMUc1u5cabpTB2d1/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbAW8OY%2Fbtrnc2XdY0x%2FyeJAQupMUc1u5cabpTB2d1%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;583&quot; height=&quot;755&quot; data-origin-width=&quot;875&quot; data-origin-height=&quot;755&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2 data-ke-size=&quot;size26&quot;&gt;3. 기존 파일의 삭제 여부 판단하기&lt;/h2&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;기존에 등록된 파일의 정보가 넘어오지 않는다면 삭제했다고 판단하려고 한다. 그러기 위해서 수정 페이지에서 기존 파일의 고유 번호(IDX)를 가지고 있어야 한다. hidden 타입을 이용해서 파일의 고유번호를 가지고 있자. 만약 삭제버튼을 누르면 해당 hidden 타입을 같이 지워주면 지운 파일의 고유번호는 넘어가지 않을 것이다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size18&quot;&gt;- boardUpdate.jsp&lt;/p&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color: #010101; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position: relative !important; overflow: auto;&quot;&gt;
&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin: 0; padding: 0; border: none; background-color: #fafafa; border-radius: 4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 6px; border-right: 2px solid #e5e5e5;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; word-break: normal; text-align: right; color: #666; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;1&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;2&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;3&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;4&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;5&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;6&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;7&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;8&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;padding: 6px 0; text-align: left;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; color: #010101; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;c:forEach&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;items&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;${file&amp;nbsp;}&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;var&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;file&quot;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;div&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;file-input&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;span&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;glyphicon&amp;nbsp;glyphicon-camera&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;aria-hidden&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;true&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;span&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;${file.ORG_FILE_NAME&amp;nbsp;}&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;span&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;${file.FILE_SIZE&amp;nbsp;}kb&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;span&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;input&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;hidden&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;FILE_${&lt;span style=&quot;background-color: #fafafa; color: #df5000;&quot;&gt;file.IDX&lt;/span&gt; }&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;true&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;a&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;href&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;'#this'&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;'file-delete'&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;삭제&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;c:forEach&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: right; margin-top: -13px; margin-right: 5px; font-size: 9px; font-style: italic;&quot;&gt;&lt;a style=&quot;color: #e5e5e5text-decoration:none;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;vertical-align: bottom; padding: 0 2px 4px 0;&quot;&gt;&lt;a style=&quot;text-decoration: none; color: white;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: #e5e5e5; color: white; border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;5행의 input hidden 타입을 추가해서 파일의 고유번호를 form 태그에 같이 넘어가도록 했다. name을 FILE_(파일IDX) 형태로 만들었고 넘어온 키 값 중에 파일의 고유번호가 없으면 삭제됐다고 판단할 것이다. 키 값으로만 판단하기 때문에 value는 true로 넘겨주었다. 새로 추가한 파일은 mulitpartFile에 담겨져 있을 것이다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2 data-ke-size=&quot;size26&quot;&gt;4. 게시글 및 파일 업데이트 작업&lt;/h2&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;service 영역에서 &lt;span style=&quot;letter-spacing: 0px;&quot;&gt;기존 파일 삭제 여부를 판단하여 파일을 삭제하고, 새로운 파일들을 받아 게시글 업로드와 같은 방식으로 업데이트를 진행할 것이다. 수정페이지에서 정의한 키 값으로 등록된 파일의 정보와 비교하여 삭제여부를 판단해보자.&lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color: #010101; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position: relative !important; overflow: auto;&quot;&gt;
&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin: 0; padding: 0; border: none; background-color: #fafafa; border-radius: 4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 6px; border-right: 2px solid #e5e5e5;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; word-break: normal; text-align: right; color: #666; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;1&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;2&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;3&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;4&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;5&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;6&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;7&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;8&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;9&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;10&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;11&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;12&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;13&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;14&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;15&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;16&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;17&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;18&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;19&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;20&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;21&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;22&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;23&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;24&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;25&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;26&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;27&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;28&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;29&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;30&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;31&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;32&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;33&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;34&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;35&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;36&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;padding: 6px 0; text-align: left;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; color: #010101; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #999999;&quot;&gt;//&amp;nbsp;BoardController&amp;nbsp;(POST)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;@RequestMapping(value&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #63a35c;&quot;&gt;&quot;/board/boardUpdate&quot;&lt;/span&gt;,&amp;nbsp;method&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;=&lt;/span&gt;RequestMethod.POST)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;public&lt;/span&gt;&amp;nbsp;ModelAndView&amp;nbsp;boardUpdatePOST(CommandMap&amp;nbsp;commandMap,&amp;nbsp;Criteria&amp;nbsp;cri,&amp;nbsp;RedirectAttributes&amp;nbsp;redAttr,&amp;nbsp;MultipartFile[]&amp;nbsp;file)&amp;nbsp;&lt;span style=&quot;color: #a71d5d;&quot;&gt;throws&lt;/span&gt;&amp;nbsp;Exception&amp;nbsp;{&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ModelAndView&amp;nbsp;mv&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #a71d5d;&quot;&gt;new&lt;/span&gt;&amp;nbsp;ModelAndView(&lt;span style=&quot;color: #63a35c;&quot;&gt;&quot;redirect:/board/boardDetail&quot;&lt;/span&gt;);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mv.addObject(&lt;span style=&quot;color: #63a35c;&quot;&gt;&quot;idx&quot;&lt;/span&gt;,&amp;nbsp;commandMap.get(&lt;span style=&quot;color: #63a35c;&quot;&gt;&quot;idx&quot;&lt;/span&gt;));&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;boardService.updateBoard(commandMap.getMap(),&amp;nbsp;file);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;redAttr.addAttribute(&lt;span style=&quot;color: #63a35c;&quot;&gt;&quot;page&quot;&lt;/span&gt;,&amp;nbsp;cri.getPage());&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;redAttr.addAttribute(&lt;span style=&quot;color: #63a35c;&quot;&gt;&quot;perPagNum&quot;&lt;/span&gt;,&amp;nbsp;cri.getPerPageNum());&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #a71d5d;&quot;&gt;return&lt;/span&gt;&amp;nbsp;mv;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;}&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #999999;&quot;&gt;//&amp;nbsp;BoardService&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;void&lt;/span&gt;&amp;nbsp;updateBoard(Map&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;map,&amp;nbsp;MultipartFile[]&amp;nbsp;file)&amp;nbsp;&lt;span style=&quot;color: #a71d5d;&quot;&gt;throws&lt;/span&gt;&amp;nbsp;Exception;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #999999;&quot;&gt;//&amp;nbsp;BoardServcieImpl&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;@Override&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #a71d5d;&quot;&gt;void&lt;/span&gt;&amp;nbsp;updateBoard(Map&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;map,&amp;nbsp;MultipartFile[]&amp;nbsp;file)&amp;nbsp;&lt;span style=&quot;color: #a71d5d;&quot;&gt;throws&lt;/span&gt;&amp;nbsp;Exception&amp;nbsp;{&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #999999;&quot;&gt;//&amp;nbsp;TODO&amp;nbsp;Auto-generated&amp;nbsp;method&amp;nbsp;stub&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;boardDAO.updateBoard(map);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;List&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;lt;&lt;/span&gt;Map&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;fileDetail&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;=&lt;/span&gt;&amp;nbsp;boardDAO.detailFile(map);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #a71d5d;&quot;&gt;for&lt;/span&gt;(&lt;span style=&quot;color: #066de2;&quot;&gt;int&lt;/span&gt;&amp;nbsp;i&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0099cc;&quot;&gt;0&lt;/span&gt;;&amp;nbsp;i&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;lt;&lt;/span&gt;fileDetail.size();&amp;nbsp;i&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;+&lt;/span&gt;)&amp;nbsp;{&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #066de2;&quot;&gt;String&lt;/span&gt;&amp;nbsp;idx&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #63a35c;&quot;&gt;&quot;FILE_&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;+&lt;/span&gt;&amp;nbsp;fileDetail.get(i).get(&lt;span style=&quot;color: #63a35c;&quot;&gt;&quot;IDX&quot;&lt;/span&gt;);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #a71d5d;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;!&lt;/span&gt;map.containsKey(idx))&amp;nbsp;{&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Map&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;list&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;=&lt;/span&gt;&amp;nbsp;fileDetail.get(i);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;boardDAO.updateDeleteFile(list);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;List&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;lt;&lt;/span&gt;Map&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;fileList&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;=&lt;/span&gt;&amp;nbsp;fileUtils.parseFileInfo(map,&amp;nbsp;file);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #a71d5d;&quot;&gt;for&lt;/span&gt;(&lt;span style=&quot;color: #066de2;&quot;&gt;int&lt;/span&gt;&amp;nbsp;i&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0099cc;&quot;&gt;0&lt;/span&gt;;&amp;nbsp;i&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;lt;&lt;/span&gt;fileList.size();&amp;nbsp;i&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;+&lt;/span&gt;)&amp;nbsp;{&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;boardDAO.insertFile(fileList.get(i));&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;}&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: right; margin-top: -13px; margin-right: 5px; font-size: 9px; font-style: italic;&quot;&gt;&lt;a style=&quot;color: #e5e5e5text-decoration:none;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;vertical-align: bottom; padding: 0 2px 4px 0;&quot;&gt;&lt;a style=&quot;text-decoration: none; color: white;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: #e5e5e5; color: white; border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;- 3, 17,&amp;nbsp; 21행: 새로 추가된 파일 정보를 가져오기 위해서 MultipartFile[] file 추가한다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;- 8행: service 영역에 file 정보들도 함께 넘겨서 업데이트한다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;- 24행: 기존에 등록된 파일 정보들을 가져온다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;- 25-31행: &quot;FILE_(파일IDX)&quot; 형식으로 키 값으로 넘어오기 때문에 기존 파일의 정보도 FILE_(파일IDX) 형식으로 바꿔서(26행) 비교한다. 만약 클라이언트에서 넘어온 값 중에 기존 파일의 정보가 없다면(27행) 파일을 삭제한다(29행).&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;- 32-35행: 새로 추가한 파일을 등록한다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;파일 삭제는 기존 파일이 삭제됐다고 판단(29행)됐을 때 DB에서 파일을 직접 삭제하지 않고 DEK_CHK 라는 컬럼을 Y로 업데이트하는 방식으로 작업했다. 그럴려면 &lt;a href=&quot;https://to-dy.tistory.com/95&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;상세 페이지&lt;/a&gt;에서 파일을 가져올 때 DEL_CHK 가 N인 파일들만 가져오는 작업이 필수로 되어 있어야 한다.&lt;/p&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color: #010101; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position: relative !important; overflow: auto;&quot;&gt;
&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin: 0; padding: 0; border: none; background-color: #fafafa; border-radius: 4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 6px; border-right: 2px solid #e5e5e5;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; word-break: normal; text-align: right; color: #666; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;1&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;2&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;3&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;4&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;5&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;6&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;7&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;8&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;9&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;10&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;11&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;12&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;13&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;14&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;15&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;16&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;17&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;padding: 6px 0; text-align: left;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; color: #010101; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #999999;&quot;&gt;//&amp;nbsp;BoardDAO&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #a71d5d;&quot;&gt;void&lt;/span&gt;&amp;nbsp;updateDeleteFile(Map&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;list)&amp;nbsp;{&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #999999;&quot;&gt;//&amp;nbsp;TODO&amp;nbsp;Auto-generated&amp;nbsp;method&amp;nbsp;stub&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;update(&lt;span style=&quot;color: #63a35c;&quot;&gt;&quot;board.deleteFile&quot;&lt;/span&gt;,&amp;nbsp;list);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;}&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #999999;&quot;&gt;//&amp;nbsp;SQL&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;lt;&lt;/span&gt;update&amp;nbsp;id&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #63a35c;&quot;&gt;&quot;deleteFile&quot;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;!&lt;/span&gt;[CDATA[&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;UPDATE&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;tb_file&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SET&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DEL_CHK&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #63a35c;&quot;&gt;'Y'&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;WHERE&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;IDX&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;=&lt;/span&gt;&amp;nbsp;#{&amp;nbsp;IDX}&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;]]&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;/&lt;/span&gt;update&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: right; margin-top: -13px; margin-right: 5px; font-size: 9px; font-style: italic;&quot;&gt;&lt;a style=&quot;color: #e5e5e5text-decoration:none;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;vertical-align: bottom; padding: 0 2px 4px 0;&quot;&gt;&lt;a style=&quot;text-decoration: none; color: white;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: #e5e5e5; color: white; border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2 data-ke-size=&quot;size26&quot;&gt;5. 테스트&lt;/h2&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;수정 페이지에서 컨텐츠 및 파일을 수정하는 테스트를 진행했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;imageblock alignLeft&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;470&quot; data-origin-height=&quot;394&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/taPic/btrniTyZmkW/NMgfhDVYdqH8jespnfM901/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/taPic/btrniTyZmkW/NMgfhDVYdqH8jespnfM901/img.png&quot; data-alt=&quot;&amp;amp;amp;gt; 수정 전 상세 페이지&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/taPic/btrniTyZmkW/NMgfhDVYdqH8jespnfM901/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FtaPic%2FbtrniTyZmkW%2FNMgfhDVYdqH8jespnfM901%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;413&quot; height=&quot;346&quot; data-origin-width=&quot;470&quot; data-origin-height=&quot;394&quot;/&gt;&lt;/span&gt;&lt;figcaption&gt;&amp;amp;gt; 수정 전 상세 페이지&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure class=&quot;imageblock alignLeft&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;857&quot; data-origin-height=&quot;748&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/lgcAP/btrnoX7zFtB/ec85LAftOlgOZGbi4vmjek/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/lgcAP/btrnoX7zFtB/ec85LAftOlgOZGbi4vmjek/img.png&quot; data-alt=&quot;&amp;amp;amp;gt; 컨텐츠를 수정하고 기존 파일 하나를 삭제하고 새로운 파일을 등록&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/lgcAP/btrnoX7zFtB/ec85LAftOlgOZGbi4vmjek/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FlgcAP%2FbtrnoX7zFtB%2Fec85LAftOlgOZGbi4vmjek%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;438&quot; height=&quot;382&quot; data-origin-width=&quot;857&quot; data-origin-height=&quot;748&quot;/&gt;&lt;/span&gt;&lt;figcaption&gt;&amp;amp;gt; 컨텐츠를 수정하고 기존 파일 하나를 삭제하고 새로운 파일을 등록&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure class=&quot;imageblock alignLeft&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;1339&quot; data-origin-height=&quot;219&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/RsNlC/btrnlmAbqMo/KYkOfVt2uE4na14iN62TtK/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/RsNlC/btrnlmAbqMo/KYkOfVt2uE4na14iN62TtK/img.png&quot; data-alt=&quot;&amp;amp;amp;gt; 고유번호 2번 파일만 넘어온 것 확인&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/RsNlC/btrnlmAbqMo/KYkOfVt2uE4na14iN62TtK/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FRsNlC%2FbtrnlmAbqMo%2FKYkOfVt2uE4na14iN62TtK%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;1339&quot; height=&quot;219&quot; data-origin-width=&quot;1339&quot; data-origin-height=&quot;219&quot;/&gt;&lt;/span&gt;&lt;figcaption&gt;&amp;amp;gt; 고유번호 2번 파일만 넘어온 것 확인&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure class=&quot;imageblock alignLeft&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;1222&quot; data-origin-height=&quot;669&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/xMYfY/btrnkvYsDPs/7Zk69r2nhSgebpk5aENkk0/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/xMYfY/btrnkvYsDPs/7Zk69r2nhSgebpk5aENkk0/img.png&quot; data-alt=&quot;&amp;amp;amp;gt; 삭제된 기존 파일 업데이트 하고 새로 추가된 파일 등록&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/xMYfY/btrnkvYsDPs/7Zk69r2nhSgebpk5aENkk0/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FxMYfY%2FbtrnkvYsDPs%2F7Zk69r2nhSgebpk5aENkk0%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;1222&quot; height=&quot;669&quot; data-origin-width=&quot;1222&quot; data-origin-height=&quot;669&quot;/&gt;&lt;/span&gt;&lt;figcaption&gt;&amp;amp;gt; 삭제된 기존 파일 업데이트 하고 새로 추가된 파일 등록&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure class=&quot;imageblock alignLeft&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;480&quot; data-origin-height=&quot;412&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/k5tKK/btrnpglxBH2/sBK6kcaDpDQlkfwtP5lI11/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/k5tKK/btrnpglxBH2/sBK6kcaDpDQlkfwtP5lI11/img.png&quot; data-alt=&quot;&amp;amp;amp;gt; 수정 후 상세페이지&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/k5tKK/btrnpglxBH2/sBK6kcaDpDQlkfwtP5lI11/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fk5tKK%2FbtrnpglxBH2%2FsBK6kcaDpDQlkfwtP5lI11%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;384&quot; height=&quot;330&quot; data-origin-width=&quot;480&quot; data-origin-height=&quot;412&quot;/&gt;&lt;/span&gt;&lt;figcaption&gt;&amp;amp;gt; 수정 후 상세페이지&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;기존 파일의 삭제 여부를 판단하는 작업은 내가 작업한 이 방법 말고도 다른 여러 방법들이 있다. 본인들이 이해하기 쉽고 편한걸로 사용하면 되지 않을까 싶다. 이렇게 게시판 만들기의 첨부 파일 관련 작업은 끝났다. 그렇게 오래 걸릴 일은 아닌데 현생이 바빠서 이제 마무리 글을 올렸다. 그래서 너무 오랜만에 보는 거라 머리가 멍하기도 했지만 오랜만에 스프링 작업을 해보니 재밌었다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;</description>
      <category>공부/Spring</category>
      <category>Spring Framework</category>
      <category>스프링</category>
      <category>스프링 프레임워크</category>
      <category>첨부파일업로드</category>
      <category>파일업로드</category>
      <author>#에게</author>
      <guid isPermaLink="true">https://to-dy.tistory.com/102</guid>
      <comments>https://to-dy.tistory.com/102#entry102comment</comments>
      <pubDate>Wed, 8 Dec 2021 14:11:23 +0900</pubDate>
    </item>
    <item>
      <title>Spring 개발 - 게시판 만들기 #첨부파일 다운로드</title>
      <link>https://to-dy.tistory.com/101</link>
      <description>&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;이전 게시글에서 파일을 업로드했다면, 이번에는 업로드된 파일을 다운로드하는 기능을 만들 것이다. 생각보다 복잡하지 않아서 개발하기 좋았다. 아래는 파일 다운로드가 진행될 순서이다. 참고해서 작업을 진행하면 된다.&lt;/p&gt;
&lt;blockquote data-ke-style=&quot;style3&quot;&gt;1. 클라이언트에서 서버에 파일 다운로드 요청&lt;br /&gt;2. 서버에서 다운로드할 파일 정보를 DB에 요청&lt;br /&gt;3. DB에서 파일 정보 검색 후 서버로 전달&lt;br /&gt;4. 서버에서 전달받은 정보로 파일 저장 경로에 있는 파일을 가져옴&lt;br /&gt;5. 가져온 파일 데이터를 클라이언트에 전송하여 다운로드&lt;/blockquote&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3 data-ke-size=&quot;size23&quot;&gt;1. 파일 다운로드 요청&lt;/h3&gt;
&lt;h4 data-ke-size=&quot;size20&quot;&gt;- boardDetail.jsp&lt;/h4&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color: #010101; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position: relative !important; overflow: auto;&quot;&gt;
&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin: 0; padding: 0; border: none; background-color: #fafafa; border-radius: 4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 6px; border-right: 2px solid #e5e5e5;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; word-break: normal; text-align: right; color: #666; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;1&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;2&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;3&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;4&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;5&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;padding: 6px 0; text-align: left;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; color: #010101; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;div&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #52be14;&quot;&gt;&quot;file-info&quot;&lt;/span&gt;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;span&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #52be14;&quot;&gt;&quot;glyphicon&amp;nbsp;glyphicon-camera&quot;&lt;/span&gt;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;aria-hidden&lt;/span&gt;=&lt;span style=&quot;color: #52be14;&quot;&gt;&quot;true&quot;&lt;/span&gt;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;span&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;a&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;href&lt;/span&gt;=&lt;span style=&quot;color: #52be14;&quot;&gt;'&amp;lt;c:url&amp;nbsp;value=&quot;/filedownload?IDX=${file.IDX&amp;nbsp;}&quot;/&amp;gt;'&lt;/span&gt;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;${file.ORG_FILE_NAME&amp;nbsp;}&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;span&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;${file.FILE_SIZE&amp;nbsp;}kb&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;span&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: right; margin-top: -13px; margin-right: 5px; font-size: 9px; font-style: italic;&quot;&gt;&lt;a style=&quot;color: #e5e5e5text-decoration:none;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;vertical-align: bottom; padding: 0 2px 4px 0;&quot;&gt;&lt;a style=&quot;text-decoration: none; color: white;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: #e5e5e5; color: white; border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;- 3행: 파일의 아이디를 같이 넘겨 다운로드 요청을 한다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3 data-ke-size=&quot;size23&quot;&gt;2. 파일 정보 가져오기&lt;/h3&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;클라이언트에서 서버로 전달한 정보를 이용해서 다운로드할 파일의 정보를 가져오자. 이 부분은 이제껏 많이 작업해왔던 부분이기 때문에 따로 설명은 하지 않을 것이다.&lt;/p&gt;
&lt;h4 data-ke-size=&quot;size20&quot;&gt;- FileService.java&lt;/h4&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position: relative !important; overflow: auto;&quot;&gt;
&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin: 0; padding: 0; border: none; background-color: #272727; border-radius: 4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 6px; border-right: 2px solid #4f4f4f;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; word-break: normal; text-align: right; color: #aaa; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;1&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;2&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;3&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;4&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;5&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;padding: 6px 0; text-align: left;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;interface&lt;/span&gt;&amp;nbsp;FileService&amp;nbsp;{&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Map&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #4be6fa;&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;selectFile(Map&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #4be6fa;&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;map);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;}&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: right; margin-top: -13px; margin-right: 5px; font-size: 9px; font-style: italic;&quot;&gt;&lt;a style=&quot;color: #4f4f4ftext-decoration:none;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;vertical-align: bottom; padding: 0 2px 4px 0;&quot;&gt;&lt;a style=&quot;text-decoration: none; color: white;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: #4f4f4f; color: white; border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;h4 data-ke-size=&quot;size20&quot;&gt;- FileServiceImpl.java&lt;/h4&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position: relative !important; overflow: auto;&quot;&gt;
&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin: 0; padding: 0; border: none; background-color: #272727; border-radius: 4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 6px; border-right: 2px solid #4f4f4f;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; word-break: normal; text-align: right; color: #aaa; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;1&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;2&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;3&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;4&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;5&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;6&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;7&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;8&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;9&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;10&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;11&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;12&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;padding: 6px 0; text-align: left;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;@Service(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;fileService&quot;&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;class&lt;/span&gt;&amp;nbsp;FileServiceImpl&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;implements&lt;/span&gt;&amp;nbsp;FileService&amp;nbsp;{&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@Resource(name&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;fileDao&quot;&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;private&lt;/span&gt;&amp;nbsp;FileDAO&amp;nbsp;fileDao;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@Override&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;public&lt;/span&gt;&amp;nbsp;Map&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #4be6fa;&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;selectFile(Map&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #4be6fa;&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;map)&amp;nbsp;{&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;return&lt;/span&gt;&amp;nbsp;fileDao.selectFileInfo(map);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;}&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: right; margin-top: -13px; margin-right: 5px; font-size: 9px; font-style: italic;&quot;&gt;&lt;a style=&quot;color: #4f4f4ftext-decoration:none;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;vertical-align: bottom; padding: 0 2px 4px 0;&quot;&gt;&lt;a style=&quot;text-decoration: none; color: white;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: #4f4f4f; color: white; border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;h4 data-ke-size=&quot;size20&quot;&gt;- FileDAO.java&lt;/h4&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position: relative !important; overflow: auto;&quot;&gt;
&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin: 0; padding: 0; border: none; background-color: #272727; border-radius: 4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 6px; border-right: 2px solid #4f4f4f;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; word-break: normal; text-align: right; color: #aaa; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;1&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;2&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;3&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;4&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;5&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;6&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;7&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;8&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;9&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;padding: 6px 0; text-align: left;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;@Repository(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;fileDao&quot;&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;class&lt;/span&gt;&amp;nbsp;FileDAO&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;extends&lt;/span&gt;&amp;nbsp;AbstractDAO{&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@SuppressWarnings(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;unchecked&quot;&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;public&lt;/span&gt;&amp;nbsp;Map&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #4be6fa;&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;selectFileInfo(Map&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #4be6fa;&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;map)&amp;nbsp;{&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;return&lt;/span&gt;&amp;nbsp;(Map&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #4be6fa;&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;&amp;gt;&lt;/span&gt;)&amp;nbsp;selectOne(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;file.selectFileInfo&quot;&lt;/span&gt;,&amp;nbsp;map);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;}&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: right; margin-top: -13px; margin-right: 5px; font-size: 9px; font-style: italic;&quot;&gt;&lt;a style=&quot;color: #4f4f4ftext-decoration:none;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;vertical-align: bottom; padding: 0 2px 4px 0;&quot;&gt;&lt;a style=&quot;text-decoration: none; color: white;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: #4f4f4f; color: white; border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;h4 data-ke-size=&quot;size20&quot;&gt;- file_sql.xml&lt;/h4&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color: #010101; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position: relative !important; overflow: auto;&quot;&gt;
&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin: 0; padding: 0; border: none; background-color: #fafafa; border-radius: 4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 6px; border-right: 2px solid #e5e5e5;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; word-break: normal; text-align: right; color: #666; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;1&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;2&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;3&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;4&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;5&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;6&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;7&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;8&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;9&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;10&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;11&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;12&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;13&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;padding: 6px 0; text-align: left;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; color: #010101; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;select&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color: #52be14;&quot;&gt;&quot;selectFileInfo&quot;&lt;/span&gt;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;parameterType&lt;/span&gt;=&lt;span style=&quot;color: #52be14;&quot;&gt;&quot;hashmap&quot;&lt;/span&gt;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;resultType&lt;/span&gt;=&lt;span style=&quot;color: #52be14;&quot;&gt;&quot;hashmap&quot;&lt;/span&gt;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;![CDATA[&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;SELECT&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;IDX,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;BOARD_IDX,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;ORG_FILE_NAME,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;SAVE_FILE_NAME&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;FROM&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;tb_file&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;WHERE&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;IDX&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;=&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;#{&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;IDX}&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0099cc;&quot;&gt;]]&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;select&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: right; margin-top: -13px; margin-right: 5px; font-size: 9px; font-style: italic;&quot;&gt;&lt;a style=&quot;color: #e5e5e5text-decoration:none;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;vertical-align: bottom; padding: 0 2px 4px 0;&quot;&gt;&lt;a style=&quot;text-decoration: none; color: white;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: #e5e5e5; color: white; border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3 data-ke-size=&quot;size23&quot;&gt;3. 클라이언트로 파일 전송&lt;/h3&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;다운로드할 파일의 정보를 가져와서 클라이언트로 파일을 전송하는 작업을 해보자.&lt;/p&gt;
&lt;h4 data-ke-size=&quot;size20&quot;&gt;FileController.java&lt;/h4&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position: relative !important; overflow: auto;&quot;&gt;
&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin: 0; padding: 0; border: none; background-color: #272727; border-radius: 4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 6px; border-right: 2px solid #4f4f4f;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; word-break: normal; text-align: right; color: #aaa; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;1&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;2&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;3&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;4&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;5&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;6&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;7&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;8&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;9&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;10&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;11&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;12&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;13&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;14&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;15&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;16&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;17&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;18&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;19&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;20&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;21&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;22&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;23&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;24&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;25&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;26&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;27&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;28&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;29&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;30&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;31&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;32&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;33&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;34&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;35&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;36&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;37&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;38&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;39&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;40&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;41&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;42&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;43&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;44&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;45&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;46&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;47&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;48&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;49&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;50&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;51&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;52&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;padding: 6px 0; text-align: left;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;package&lt;/span&gt;&amp;nbsp;com.tody.board.controller;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;import&lt;/span&gt;&amp;nbsp;java.io.File;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;import&lt;/span&gt;&amp;nbsp;java.net.URLEncoder;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;import&lt;/span&gt;&amp;nbsp;java.util.Map;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;import&lt;/span&gt;&amp;nbsp;javax.annotation.Resource;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;import&lt;/span&gt;&amp;nbsp;javax.servlet.http.HttpServletRequest;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;import&lt;/span&gt;&amp;nbsp;javax.servlet.http.HttpServletResponse;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;import&lt;/span&gt;&amp;nbsp;org.apache.commons.io.FileUtils;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;import&lt;/span&gt;&amp;nbsp;org.springframework.stereotype.Controller;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;import&lt;/span&gt;&amp;nbsp;org.springframework.web.bind.annotation.RequestMapping;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;import&lt;/span&gt;&amp;nbsp;com.tody.board.service.FileService;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;import&lt;/span&gt;&amp;nbsp;com.tody.common.common.CommandMap;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;@Controller&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;class&lt;/span&gt;&amp;nbsp;FileController&amp;nbsp;{&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@Resource(name&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;uploadPath&quot;&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;String&lt;/span&gt;&amp;nbsp;uploadPath;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@Resource(name&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;fileService&quot;&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;private&lt;/span&gt;&amp;nbsp;FileService&amp;nbsp;fileService;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@RequestMapping(value&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;/filedownload&quot;&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;void&lt;/span&gt;&amp;nbsp;downloadFile(CommandMap&amp;nbsp;commandMap,&amp;nbsp;HttpServletRequest&amp;nbsp;request,&amp;nbsp;HttpServletResponse&amp;nbsp;response)&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;throws&lt;/span&gt;&amp;nbsp;Exception&amp;nbsp;{&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Map&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #4be6fa;&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;file&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;fileService.selectFile(commandMap.getMap());&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;String&lt;/span&gt;&amp;nbsp;saveFileName&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color: #4be6fa;&quot;&gt;String&lt;/span&gt;)file.get(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;SAVE_FILE_NAME&quot;&lt;/span&gt;);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;String&lt;/span&gt;&amp;nbsp;originalFileName&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color: #4be6fa;&quot;&gt;String&lt;/span&gt;)file.get(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;ORG_FILE_NAME&quot;&lt;/span&gt;);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;File&amp;nbsp;downloadFile&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;new&lt;/span&gt;&amp;nbsp;File(uploadPath&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;+&lt;/span&gt;&amp;nbsp;saveFileName);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #4be6fa;&quot;&gt;byte&lt;/span&gt;&amp;nbsp;fileByte[]&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;FileUtils.readFileToByteArray(downloadFile);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;response.setContentType(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;application/octet-stream&quot;&lt;/span&gt;);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;response.setContentLength(fileByte.&lt;span style=&quot;color: #4be6fa;&quot;&gt;length&lt;/span&gt;);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;response.setHeader(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;Content-Disposition&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;attachment;&amp;nbsp;fileName=\&quot;&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;+&lt;/span&gt;&amp;nbsp;URLEncoder.encode(originalFileName,&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;)&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;\&quot;;&quot;&lt;/span&gt;);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;response.setHeader(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;Content-Transfer-Encoding&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;binary&quot;&lt;/span&gt;);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;response.getOutputStream().write(fileByte);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;response.getOutputStream().flush();&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;response.getOutputStream().close();&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;}&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: right; margin-top: -13px; margin-right: 5px; font-size: 9px; font-style: italic;&quot;&gt;&lt;a style=&quot;color: #4f4f4ftext-decoration:none;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;vertical-align: bottom; padding: 0 2px 4px 0;&quot;&gt;&lt;a style=&quot;text-decoration: none; color: white;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: #4f4f4f; color: white; border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;- 28행: 서버에서 화면으로 응답을 하기 위해 HttpServletResponse 를 사용한다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;- 30행: 클라이언트로부터 전달받은 정보로 DB에서 다운로드할 파일 정보를 가져온다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;- 35행: 파일을 업로드할 때 저장한 파일 이름을 가지고 디렉토리를 가져온다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;- 37행: 파일을 byte 배열로 변환한다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;- 39행: &quot;application/octet-stream&quot; 은 자바에서 사용하는 파일 다운로드 응답 형식으로, 어플리케이션 파일이 리턴된다고 설정한다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;- 40행: 파일 사이즈를 지정한다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;- 42행: &quot;attachment;fileName=&quot;을 사용하면 다운로드시 파일 이름을 지정해줄 수 있다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;- 43행: &quot;application/octet-stream&quot;은 binary 데이터이기 때문에 binary로 인코딩해준다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;- 45행: 버퍼에 파일을 담아 스트림으로 출력한다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;- 46행: 버퍼에 저장된 내용을 클라이언트로 전송하고 버퍼를 비운다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;- 47행: 출력 스트림을 종료한다. 참고로 close() 함수 자체에서 flush() 함수를 호출하기 때문에 굳이 flush() 를 호출하지 않아도 된다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;파일을 클라이언트로 전송하는 방법외엔 전부 여지껏 작업해왔던 부분이라서 쉽게 다운로드를 구현할 수 있다. 만들다보니, &quot;전체 다운로드&quot; 기능도 만들면 좋지 않을까? 라는 생각도 들었다. 작업할 지 모르겠지만 만약 만들게 된다면 아래에 추가하도록 하겠다.&lt;br /&gt;이제 정말 마지막으로 게시글을 수정/삭제할 때 파일도 수정/삭제 할 수 있도록 작업만 하면 파일 업/다운로드는 진짜 끝이 난다! 와!&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;</description>
      <category>공부/Spring</category>
      <category>Spring Framework</category>
      <category>스프링</category>
      <category>스프링 프레임워크</category>
      <category>첨부파일 다운로드</category>
      <category>파일다운로드</category>
      <author>#에게</author>
      <guid isPermaLink="true">https://to-dy.tistory.com/101</guid>
      <comments>https://to-dy.tistory.com/101#entry101comment</comments>
      <pubDate>Fri, 29 Oct 2021 18:05:29 +0900</pubDate>
    </item>
    <item>
      <title>Spring 개발 - 게시판 만들기 #첨부파일 업로드</title>
      <link>https://to-dy.tistory.com/95</link>
      <description>&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;게시글에 파일을&amp;nbsp;업로드 할 수 있게 하려고 한다. 단일 파일 업로드 방식도 있고&amp;nbsp;다중 파일 업로드 방식도 있다. 여기선 다중 파일 업로드 방식을 포스팅한다. 단일 파일 업로드와 다중 파일 업로드는 차이가 없다고 생각한다. 왜냐하면 첨부파일 업로드를 공부할 때 단일 파일 업로드를 만들고 배열을 이용해서 다중 파일 업로드로 확장시켰기 때문이다. 따라서 단일파일 업로드를 원하면 배열인 부분들만 없애주면 된다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;1. DB 생성&lt;/span&gt;&lt;/p&gt;&lt;p&gt;첨부 파일의 정보를 저장하는 테이블을 생성한다.&lt;/p&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;CREATE&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;TABLE&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#7DA123&quot;&gt;`tb_file`&lt;/span&gt;&amp;nbsp;(&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#7DA123&quot;&gt;`IDX`&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;int&lt;/span&gt;(&lt;span style=&quot;color:#004fc8&quot;&gt;11&lt;/span&gt;)&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;NOT&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;NULL&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;AUTO_INCREMENT&lt;/span&gt;,&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#7DA123&quot;&gt;`BOARD_IDX`&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;int&lt;/span&gt;(&lt;span style=&quot;color:#004fc8&quot;&gt;11&lt;/span&gt;)&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;NOT&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;NULL&lt;/span&gt;,&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#7DA123&quot;&gt;`ORG_FILE_NAME`&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;varchar&lt;/span&gt;(&lt;span style=&quot;color:#004fc8&quot;&gt;260&lt;/span&gt;)&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;NOT&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;NULL&lt;/span&gt;,&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#7DA123&quot;&gt;`SAVE_FILE_NAME`&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;varchar&lt;/span&gt;(&lt;span style=&quot;color:#004fc8&quot;&gt;36&lt;/span&gt;)&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;NOT&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;NULL&lt;/span&gt;,&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#7DA123&quot;&gt;`FILE_SIZE`&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;int&lt;/span&gt;(&lt;span style=&quot;color:#004fc8&quot;&gt;11&lt;/span&gt;)&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;DEFAULT&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;NULL&lt;/span&gt;,&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#7DA123&quot;&gt;`UPDATE_DATE`&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;timestamp&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;NOT&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;NULL&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;DEFAULT&lt;/span&gt;&amp;nbsp;CURRENT_TIMESTAMP&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;ON&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;UPDATE&lt;/span&gt;&amp;nbsp;CURRENT_TIMESTAMP,&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#7DA123&quot;&gt;`CREA_ID`&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;varchar&lt;/span&gt;(&lt;span style=&quot;color:#004fc8&quot;&gt;30&lt;/span&gt;)&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;NOT&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;NULL&lt;/span&gt;,&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#7DA123&quot;&gt;`DEL_CHK`&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;varchar&lt;/span&gt;(&lt;span style=&quot;color:#004fc8&quot;&gt;1&lt;/span&gt;)&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;NOT&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;NULL&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;DEFAULT&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#7DA123&quot;&gt;'N'&lt;/span&gt;,&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#7DA123&quot;&gt;`CREA_DATE`&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;timestamp&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;NOT&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;NULL&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;DEFAULT&lt;/span&gt;&amp;nbsp;CURRENT_TIMESTAMP,&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;PRIMARY&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;KEY&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color:#7DA123&quot;&gt;`IDX`&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;)&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;ENGINE&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;=&lt;/span&gt;InnoDB&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;DEFAULT&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;CHARSET&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;=&lt;/span&gt;utf8&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;2. 라이브러리 추가&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;pom.xml&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;&amp;lt;!--&amp;nbsp;commons-fileupload&amp;nbsp;--&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;dependency&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;groupId&lt;/span&gt;&amp;gt;commons-fileupload&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;groupId&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;artifactId&lt;/span&gt;&amp;gt;commons-fileupload&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;artifactId&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;version&lt;/span&gt;&amp;gt;1.3.2&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;version&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;dependency&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;파일 업로드를 위한 라이브러리를 추가한다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;3. context 설정&lt;/span&gt;&lt;/p&gt;&lt;p&gt;spring 설정 폴더에 context-*.xml 파일을 생성한다. file을 위한 설정만 넣어둘거기 때문에 새로 만들었다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;context-file.xml&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;?xml&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;version&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;1.0&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;encoding&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color:#0a9989&quot;&gt;?&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;beans&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;xmlns&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;http://www.springframework.org/schema/beans&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;xmlns:xsi&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;xsi:schemaLocation&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;http://www.springframework.org/schema/beans&amp;nbsp;http://www.springframework.org/schema/beans/spring-beans.xsd&quot;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#999999&quot;&gt;&amp;lt;!--&amp;nbsp;MultipartResolver&amp;nbsp;설정&amp;nbsp;--&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;bean&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;multipartResolver&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;org.springframework.web.multipart.commons.CommonsMultipartResolver&quot;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;property&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;maxUploadSize&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;100000000&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;/&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;property&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;maxInMemorySize&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;100000000&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;/&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;bean&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#999999&quot;&gt;&amp;lt;!--&amp;nbsp;파일&amp;nbsp;업로드&amp;nbsp;디렉토리&amp;nbsp;설정&amp;nbsp;--&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;bean&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;uploadPath&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;java.lang.String&quot;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;constructor-arg&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;C:\\_dev\\file\\&quot;&lt;/span&gt;&lt;span style=&quot;color:#0a9989&quot;&gt;/&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;bean&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;beans&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;파일 업로드를 처리하기 위해서 CommonsMultipartResolver를 등록해야 한다. property 설정을 통해 파일의 최대 크기를 제한할 수 있다. 단위는 byte로, 10MB로 제한하였다. 참고로 한글명이 깨지지 않기 위해서는 UTF-8 코딩이 되어 있어야 한다. (프로젝트를 설정할 때 필터 설정을 했을 것이다.)&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;파일 업로드의 디렉토리를 설정한다. 즉, 업로드되는 파일들을 저장할 경로를 설정하는 것이다. 원하는 경로를 넣으면 된다. 경로는 //가 아닌 \\로 설정해야 한다. 해당 경로에 폴더가 굳이 없어도 된다. 나중에&amp;nbsp;업로드 할 파일들을 조작하는 클래스를 생성할 때 폴더가 없으면 새로 생성하는 로직도 넣을 것이다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;4. 파일 업로드 JSP 생성&lt;/span&gt;&lt;/p&gt;&lt;p&gt;파일 추가 버튼을 눌러&amp;nbsp;파일 업로드를 할 수 있는 input 태그가 생기는 자바스크립트를 추가할 것이다. (자바스크립트는 미숙하기 때문에 완벽하지 않을 수도 있다.) 스크립트를 쓰고 싶지 않다면 등록될 파일 수를 정해서 input 태그를 정한 만큼만 보여주는 방법도 있다. jsp 부분은 많은 방법이 있으니 원하는 방법을 사용하면 된다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;boardWrite.jsp&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important;overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0;padding:0;border:none;background-color:#fafafa;border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px;border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0;padding:0;word-break:normal;text-align:right;color:#666;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;18&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;19&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;20&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;21&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;22&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;23&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;24&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;25&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;26&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;27&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;28&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;29&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;30&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;31&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;32&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding: 6px 0px;&quot;&gt;&lt;div style=&quot;margin:0;padding:0;color:#010101;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;form&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;action&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;'&amp;lt;c:url&amp;nbsp;value='&lt;/span&gt;/board/boardInsert&lt;span style=&quot;color:#df5000&quot;&gt;'/&amp;gt;'&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;method&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;post&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;enctype&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;multipart/form-data&quot;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#999999&quot;&gt;&amp;lt;!--&amp;nbsp;생략&amp;nbsp;--&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;div&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;form-group&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;file-list&quot;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;a&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;href&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;#this&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;onclick&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;addFile()&quot;&lt;/span&gt;&amp;gt;파일추가&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;a&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;div&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;file-group&quot;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;input&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;file&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;file&quot;&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;a&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;href&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;'#this'&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;'file-delete'&lt;/span&gt;&amp;gt;삭제&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;a&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;div&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;div&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;button&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;submit&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;btn&amp;nbsp;btn-default&quot;&lt;/span&gt;&amp;gt;작성하기&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;button&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;form&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;script&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;text/javascript&quot;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#066de2&quot;&gt;document&lt;/span&gt;).ready(&lt;span style=&quot;color:#a71d5d&quot;&gt;function&lt;/span&gt;()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#63a35c&quot;&gt;&quot;a[name='file-delete']&quot;&lt;/span&gt;).on(&lt;span style=&quot;color:#63a35c&quot;&gt;&quot;click&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;function&lt;/span&gt;(e)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;e.preventDefault();&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;deleteFile($(this));&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;})&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;function&lt;/span&gt;&amp;nbsp;addFile()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;var&lt;/span&gt;&amp;nbsp;str&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#63a35c&quot;&gt;&quot;&amp;lt;div&amp;nbsp;class='file-group'&amp;gt;&amp;lt;input&amp;nbsp;type='file'&amp;nbsp;name='file'&amp;gt;&amp;lt;a&amp;nbsp;href='#this'&amp;nbsp;name='file-delete'&amp;gt;삭제&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&quot;&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#63a35c&quot;&gt;&quot;#file-list&quot;&lt;/span&gt;).append(str);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color:#63a35c&quot;&gt;&quot;a[name='file-delete']&quot;&lt;/span&gt;).on(&lt;span style=&quot;color:#63a35c&quot;&gt;&quot;click&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;function&lt;/span&gt;(e)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;e.preventDefault();&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;deleteFile($(this));&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;function&lt;/span&gt;&amp;nbsp;deleteFile(obj)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;obj.&lt;span style=&quot;color:#066de2&quot;&gt;parent&lt;/span&gt;().remove();&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right;margin-top:-13px;margin-right:5px;font-size:9px;font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom;padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;- 01행 : enctype=&quot;multipart/form-data&quot; 부분이 반드시 있어야 파일들을 가져올 수 있다.&lt;/p&gt;&lt;p&gt;- 04, 20-27행&amp;nbsp;: 추가 버튼을 누르면 onclick을 이용해 addFile() 함수를 실행하여 input 태그를 생성해준다.&lt;/p&gt;&lt;p&gt;- 06, 29-31행 : 삭제 버튼을 눌러 해당 input 태그를 없애준다.&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 300px; width: 300px; height: 101px;; height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/998A814F5DF8646039&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F998A814F5DF8646039&quot; width=&quot;300&quot; height=&quot;101&quot; filename=&quot;file2.PNG&quot; filemime=&quot;image/jpeg&quot; style=&quot;width: 300px; height: 101px;&quot; original=&quot;yes&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;파일추가 버튼을 누르면 파일 선택 폼이 하나씩 생기고 삭제를 누르면 해당 폼이 없어지는 형태로 구성하였다.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;5. 파일 데이터가 넘어오는 지 확인&lt;/span&gt;&lt;/p&gt;&lt;p&gt;파일 데이터들이&amp;nbsp;구분되서 넘어오는 지 확인을 해보자. 어떻게 넘어오는 지 파악해야 추가, 삭제를&amp;nbsp;손쉽게 할 수 있기 때문이다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;UploadController&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important;overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0;padding:0;border:none;background-color:#fafafa;border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px;border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0;padding:0;word-break:normal;text-align:right;color:#666;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding: 6px 0px;&quot;&gt;&lt;div style=&quot;margin:0;padding:0;color:#010101;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@RequestMapping(&lt;span style=&quot;color:#63a35c&quot;&gt;&quot;/board/boardInsert&quot;&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;public&lt;/span&gt;&amp;nbsp;ModelAndView&amp;nbsp;boardInsert(CommandMap&amp;nbsp;commandMap,&amp;nbsp;MultipartFile[]&amp;nbsp;file)&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;throws&lt;/span&gt;&amp;nbsp;Exception&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ModelAndView&amp;nbsp;mav&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;new&lt;/span&gt;&amp;nbsp;ModelAndView(&lt;span style=&quot;color:#63a35c&quot;&gt;&quot;redirect:/board/boardList&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#999999&quot;&gt;//boardService.insertBoard(commandMap);&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;for&lt;/span&gt;(&lt;span style=&quot;color:#066de2&quot;&gt;int&lt;/span&gt;&amp;nbsp;i&lt;span style=&quot;color:#a71d5d&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;0&lt;/span&gt;;&amp;nbsp;i&lt;span style=&quot;color:#a71d5d&quot;&gt;&amp;lt;&lt;/span&gt;file.&lt;span style=&quot;color:#066de2&quot;&gt;length&lt;/span&gt;;&amp;nbsp;i&lt;span style=&quot;color:#a71d5d&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#a71d5d&quot;&gt;+&lt;/span&gt;)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;log.debug(&lt;span style=&quot;color:#63a35c&quot;&gt;&quot;==================&amp;nbsp;file&amp;nbsp;start&amp;nbsp;==================&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;log.debug(&lt;span style=&quot;color:#63a35c&quot;&gt;&quot;파일&amp;nbsp;이름:&amp;nbsp;&quot;&lt;/span&gt;&lt;span style=&quot;color:#a71d5d&quot;&gt;+&lt;/span&gt;file[i].getName());&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;log.debug(&lt;span style=&quot;color:#63a35c&quot;&gt;&quot;파일&amp;nbsp;실제&amp;nbsp;이름:&amp;nbsp;&quot;&lt;/span&gt;&lt;span style=&quot;color:#a71d5d&quot;&gt;+&lt;/span&gt;file[i].getOriginalFilename());&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;log.debug(&lt;span style=&quot;color:#63a35c&quot;&gt;&quot;파일&amp;nbsp;크기:&amp;nbsp;&quot;&lt;/span&gt;&lt;span style=&quot;color:#a71d5d&quot;&gt;+&lt;/span&gt;file[i].getSize());&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;log.debug(&lt;span style=&quot;color:#63a35c&quot;&gt;&quot;content&amp;nbsp;type:&amp;nbsp;&quot;&lt;/span&gt;&lt;span style=&quot;color:#a71d5d&quot;&gt;+&lt;/span&gt;file[i].getContentType());&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;log.debug(&lt;span style=&quot;color:#63a35c&quot;&gt;&quot;==================&amp;nbsp;file&amp;nbsp;&amp;nbsp;&amp;nbsp;END&amp;nbsp;==================&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;return&lt;/span&gt;&amp;nbsp;mav;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right;margin-top:-13px;margin-right:5px;font-size:9px;font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom;padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;- 02행: MultipartFile[] file 을 추가한다. 다중 파일이 넘어오기 때문에 배열로 선언한다.&lt;/p&gt;&lt;p&gt;- 04행: 파일들이 잘 넘어오는 지 확인 용도이기 때문에 게시글 추가 서비스는 주석처리 했다.&lt;/p&gt;&lt;p&gt;- 05~12행: for문을 사용해서 넘어오는 파일들이 정보를 확인할 것이다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 700px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/9918AB4D5DE5CC8807&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F9918AB4D5DE5CC8807&quot; width=&quot;700&quot; height=&quot;266&quot; filename=&quot;file1.PNG&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;실행을 해서&amp;nbsp;파일을 여러개 추가해서 글을 작성해보자. 그러면 로그에도 이렇게 업로드한 파일의 실제 이름, 크기, 타입 등을 확인할 수 있다. 다중 파일 업로드가 아닌 단일 파일 업로드를 하려고 한다면,&amp;nbsp;배열로 선언된 MultipartFile[] 부분을 MultipartFile 로 선언해주면 된다. 이제 배열로 파일들이 들어온 걸 확인 했으니 컨트롤러를 원상복귀시킨 뒤에&amp;nbsp;업로드를 처리하는 클래스를 만들어보자.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;6. FileUtils 클래스 생성&lt;/span&gt;&lt;/p&gt;&lt;p&gt;업로드할 파일들을 조작하고 업로드 기능들을 처리할 클래스를 생성한다. 파일 업로드는 다른 곳에서도 사용가능한 공통적인 부분이라 생각했기에 common&amp;nbsp;패키지 아래 Utils 패키지를 생성해서 그 안에 클래스를 생성했다.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;FileUtils.java&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#f0f0f0;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important;overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0;padding:0;border:none;background-color:#272727;border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px;border-right:2px solid #4f4f4f&quot;&gt;&lt;div style=&quot;margin:0;padding:0;word-break:normal;text-align:right;color:#aaa;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;18&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;19&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;20&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;21&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;22&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;23&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;24&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;25&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;26&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;27&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;28&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;29&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;30&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;31&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;32&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;33&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;34&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;35&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;36&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;37&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;38&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;39&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;40&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;41&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;42&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;43&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;44&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;45&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;46&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;47&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;48&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding: 6px 0px;&quot;&gt;&lt;div style=&quot;margin:0;padding:0;color:#f0f0f0;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;@Component(&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;fileUtils&quot;&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;class&lt;/span&gt;&amp;nbsp;FileUtils&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;private&lt;/span&gt;&amp;nbsp;Log&amp;nbsp;log&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;LogFactory.getLog(&lt;span style=&quot;color:#ff3399&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color:#4be6fa&quot;&gt;getClass&lt;/span&gt;());&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@Resource(name&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;uploadPath&quot;&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#4be6fa&quot;&gt;String&lt;/span&gt;&amp;nbsp;uploadPath;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;List&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;Map&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;parseFileInfo(Map&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;map,&amp;nbsp;MultipartFile[]&amp;nbsp;file)&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;throws&lt;/span&gt;&amp;nbsp;Exception&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#4be6fa&quot;&gt;String&lt;/span&gt;&amp;nbsp;boardIDX&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#4be6fa&quot;&gt;String&lt;/span&gt;.&lt;span style=&quot;color:#4be6fa&quot;&gt;valueOf&lt;/span&gt;(map.get(&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;idx&quot;&lt;/span&gt;));&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#4be6fa&quot;&gt;String&lt;/span&gt;&amp;nbsp;creaID&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color:#4be6fa&quot;&gt;String&lt;/span&gt;)&amp;nbsp;map.get(&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;crea_id&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;List&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;Map&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;fileList&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;new&lt;/span&gt;&amp;nbsp;ArrayList&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;Map&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;();&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;File&amp;nbsp;target&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;new&lt;/span&gt;&amp;nbsp;File(uploadPath);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color:#ff3399&quot;&gt;!&lt;/span&gt;target.exists())&amp;nbsp;target.mkdirs();&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;for&lt;/span&gt;(&lt;span style=&quot;color:#4be6fa&quot;&gt;int&lt;/span&gt;&amp;nbsp;i&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#c10aff&quot;&gt;0&lt;/span&gt;;&amp;nbsp;i&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;file.&lt;span style=&quot;color:#4be6fa&quot;&gt;length&lt;/span&gt;;&amp;nbsp;i&lt;span style=&quot;color:#ff3399&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;+&lt;/span&gt;)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#4be6fa&quot;&gt;String&lt;/span&gt;&amp;nbsp;orgFileName&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;file[i].getOriginalFilename();&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#4be6fa&quot;&gt;String&lt;/span&gt;&amp;nbsp;orgFileExtension&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;orgFileName.&lt;span style=&quot;color:#4be6fa&quot;&gt;substring&lt;/span&gt;(orgFileName.&lt;span style=&quot;color:#4be6fa&quot;&gt;lastIndexOf&lt;/span&gt;(&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;.&quot;&lt;/span&gt;));&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#4be6fa&quot;&gt;String&lt;/span&gt;&amp;nbsp;saveFileName&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;UUID.randomUUID().&lt;span style=&quot;color:#4be6fa&quot;&gt;toString&lt;/span&gt;().replaceAll(&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;-&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;&quot;&lt;/span&gt;)&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;+&lt;/span&gt;&amp;nbsp;orgFileExtension;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Long&amp;nbsp;saveFileSize&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;file[i].getSize();&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;log.debug(&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;==================&amp;nbsp;file&amp;nbsp;start&amp;nbsp;==================&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;log.debug(&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;파일&amp;nbsp;실제&amp;nbsp;이름:&amp;nbsp;&quot;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;+&lt;/span&gt;orgFileName);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;log.debug(&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;파일&amp;nbsp;저장&amp;nbsp;이름:&amp;nbsp;&quot;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;+&lt;/span&gt;saveFileName);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;log.debug(&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;파일&amp;nbsp;크기:&amp;nbsp;&quot;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;+&lt;/span&gt;saveFileSize);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;log.debug(&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;content&amp;nbsp;type:&amp;nbsp;&quot;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;+&lt;/span&gt;file[i].getContentType());&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;log.debug(&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;==================&amp;nbsp;file&amp;nbsp;&amp;nbsp;&amp;nbsp;END&amp;nbsp;==================&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;target&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;new&lt;/span&gt;&amp;nbsp;File(uploadPath,&amp;nbsp;saveFileName);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;file[i].transferTo(target);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Map&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;fileInfo&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;new&lt;/span&gt;&amp;nbsp;HashMap&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;();&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fileInfo.put(&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;BOARD_IDX&quot;&lt;/span&gt;,&amp;nbsp;boardIDX);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fileInfo.put(&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;ORG_FILE_NAME&quot;&lt;/span&gt;,&amp;nbsp;orgFileName);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fileInfo.put(&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;SAVE_FILE_NAME&quot;&lt;/span&gt;,&amp;nbsp;saveFileName);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fileInfo.put(&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;FILE_SIZE&quot;&lt;/span&gt;,&amp;nbsp;saveFileSize);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fileInfo.put(&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;CREA_ID&quot;&lt;/span&gt;,&amp;nbsp;creaID);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fileList.&lt;span style=&quot;color:#4be6fa&quot;&gt;add&lt;/span&gt;(fileInfo);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;return&lt;/span&gt;&amp;nbsp;fileList;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right;margin-top:-13px;margin-right:5px;font-size:9px;font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom;padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(79, 79, 79); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;- 01행: xml의 Bean으로 fileUtils를 등록한다.&lt;/p&gt;&lt;p&gt;- 06, 07행: context 설정에서 설정한 디렉토리를 담고 있다.&lt;/p&gt;&lt;p&gt;- 11, 12행: 해당 게시글의 글 번호(idx)와 작성자(crea_id)를 담는다.&lt;/p&gt;&lt;p&gt;- 14행: 가공된 파일들을 담을 곳이다.&lt;/p&gt;&lt;p&gt;- 16, 17행: 파일을 저장할 경로가&amp;nbsp;존재하지 않으면 폴더를 생성한다.&lt;/p&gt;&lt;p&gt;- 22, 23행: 실제 파일의 이름을 랜덤의 이름으로 변경한다. 이 이름으로 파일이 서버에 저장될 것이다.&lt;/p&gt;&lt;p&gt;- 33행: 서버에 실제 파일을 저장한다. (임시디렉토리에 업로드)&lt;/p&gt;&lt;p&gt;- 34행: 임시 디렉토리에 업로드된 파일 데이터를 지정한 폴더에 저장한다.&lt;/p&gt;&lt;p&gt;- 36~43행: 파일의 정보를 각각의 이름으로 fileInfo에 담은 뒤, fileList에 담아준다.&lt;/p&gt;&lt;p&gt;- 46행: 파일들의 정보가 담긴 fileList를 반환한다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;7. 파일 등록 DAO, SQL 추가&lt;/span&gt;&lt;/p&gt;&lt;p&gt;파일 등록과 게시글 등록의 테이블은 각자&amp;nbsp;다르기 때문에 파일 등록의 DAO, SQL을 추가해준다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;boardDAO.java&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#a71d5d&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;void&lt;/span&gt;&amp;nbsp;insertFile(Map&lt;span style=&quot;color:#a71d5d&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#066de2&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color:#a71d5d&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;map)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;insert(&lt;span style=&quot;color:#63a35c&quot;&gt;&quot;board.insertFile&quot;&lt;/span&gt;,&amp;nbsp;map);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;baord_sql.xml&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;18&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;19&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;20&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;21&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;22&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;23&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;24&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;insert&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;insertFile&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;parameterType&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;hashmap&quot;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;![CDATA[&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;INSERT&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;INTO&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;tb_file&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;(&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;BOARD_IDX,&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;ORG_FILE_NAME,&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;SAVE_FILE_NAME,&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;FILE_SIZE,&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;CREA_ID,&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;CREA_DATE,&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;UPDATE_DATE&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;VALUES&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;(&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;#{&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;BOARD_IDX},&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;#{&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;ORG_FILE_NAME},&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;#{&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;SAVE_FILE_NAME},&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;#{&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;FILE_SIZE},&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;#{&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;CREA_ID},&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;SYSDATE(),&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;SYSDATE()&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;]]&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;insert&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;FileUtils 클래스에서 38~42행의 name을 사용해준다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;8. 게시글 등록페이지 수정&lt;/span&gt;&lt;/p&gt;&lt;p&gt;글을 작성할 때 제목, 내용, 작성자 등은 CommandMap에 담아 오고, 파일들은 MultipartFile에 담아 온다. 그리고 게시글을 등록한 후에 게시글의 idx를 포함해서 파일을 등록 해준다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;Controller 영역&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#f0f0f0;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important;overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0;padding:0;border:none;background-color:#272727;border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px;border-right:2px solid #4f4f4f&quot;&gt;&lt;div style=&quot;margin:0;padding:0;word-break:normal;text-align:right;color:#aaa;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding: 6px 0px;&quot;&gt;&lt;div style=&quot;margin:0;padding:0;color:#f0f0f0;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@RequestMapping(&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;/board/boardInsert&quot;&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;ModelAndView&amp;nbsp;boardInsert(CommandMap&amp;nbsp;commandMap,&amp;nbsp;MultipartFile[]&amp;nbsp;file)&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;throws&lt;/span&gt;&amp;nbsp;Exception&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ModelAndView&amp;nbsp;mav&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;new&lt;/span&gt;&amp;nbsp;ModelAndView(&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;redirect:/board/boardList&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;boardService.insertBoard(commandMap,&amp;nbsp;file);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;return&lt;/span&gt;&amp;nbsp;mav;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right;margin-top:-13px;margin-right:5px;font-size:9px;font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom;padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(79, 79, 79); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;- 02행: MutlipartFile 을 배열형태로 가져온다.&lt;/p&gt;&lt;p&gt;- 04행: 게시글의 정보와 파일의 정보를&amp;nbsp;같이 넘겨준다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;Service 영역&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#f0f0f0;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important;overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0;padding:0;border:none;background-color:#272727;border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px;border-right:2px solid #4f4f4f&quot;&gt;&lt;div style=&quot;margin:0;padding:0;word-break:normal;text-align:right;color:#aaa;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding: 6px 0px;&quot;&gt;&lt;div style=&quot;margin:0;padding:0;color:#f0f0f0;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;BoardService&amp;nbsp;영역&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;void&lt;/span&gt;&amp;nbsp;insertBoard(CommandMap&amp;nbsp;commandMap,&amp;nbsp;MultipartFile[]&amp;nbsp;file)&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;throws&lt;/span&gt;&amp;nbsp;Exception;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;BoardServiceImpl&amp;nbsp;영역&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;@Override&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;void&lt;/span&gt;&amp;nbsp;insertBoard(CommandMap&amp;nbsp;commandMap,&amp;nbsp;MultipartFile[]&amp;nbsp;file)&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;throws&lt;/span&gt;&amp;nbsp;Exception{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;boardDAO.insertBoard(commandMap);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;List&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;Map&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;fileList&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;fileUtils.parseFileInfo(commandMap.getMap(),&amp;nbsp;file);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;for&lt;/span&gt;(&lt;span style=&quot;color:#4be6fa&quot;&gt;int&lt;/span&gt;&amp;nbsp;i&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#c10aff&quot;&gt;0&lt;/span&gt;;&amp;nbsp;i&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;fileList.size();&amp;nbsp;i&lt;span style=&quot;color:#ff3399&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;+&lt;/span&gt;)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;boardDAO.insertFile(fileList.get(i));&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right;margin-top:-13px;margin-right:5px;font-size:9px;font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom;padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(79, 79, 79); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;- 02, 06행: 마찬가지로 MutltipartFile을 배열형태로 가져온다.&lt;/p&gt;&lt;p&gt;- 08~11행: fileUtils 클래스에서 가공된 정보들을 하나씩 sql처리 해서 등록한다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;board_sql.xml&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;insert&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;insertBoard&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;parameterType&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;hashmap&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;useGeneratedKeys&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;true&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;keyProperty&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;idx&quot;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;![CDATA[&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;]]&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;insert&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;게시글의 내용을 등록하는 부분인데, 여기에 useGeneratedKeys 와 keyProperty가 추가되었다. 파일을 등록할때 해당&amp;nbsp;게시글의 번호(idx)가 필요하기 때문에 이 두가지를 추가해준다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;9. 상세페이지 수정&lt;/span&gt;&lt;/p&gt;&lt;p&gt;상세 페이지에 들어왔을 때 등록된 파일들을 보여줘야 한다. 파일 이름, 파일 크기 정도를 보여주려고 한다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;BoardDAO.java&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important;overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0;padding:0;border:none;background-color:#fafafa;border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px;border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0;padding:0;word-break:normal;text-align:right;color:#666;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding: 6px 0px;&quot;&gt;&lt;div style=&quot;margin:0;padding:0;color:#010101;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@SuppressWarnings(&lt;span style=&quot;color:#993333&quot;&gt;&quot;unchecked&quot;&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;List&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;Map&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;detailFile(Map&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;map)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;return&lt;/span&gt;&amp;nbsp;selectList(&lt;span style=&quot;color:#993333&quot;&gt;&quot;board.detailFile&quot;&lt;/span&gt;,&amp;nbsp;map);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right;margin-top:-13px;margin-right:5px;font-size:9px;font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom;padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;board_sql.xml&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important;overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0;padding:0;border:none;background-color:#fafafa;border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px;border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0;padding:0;word-break:normal;text-align:right;color:#666;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding: 6px 0px;&quot;&gt;&lt;div style=&quot;margin:0;padding:0;color:#010101;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;select&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;detailFile&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;parameterType&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;hashmap&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;resultType&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;hashmap&quot;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;![CDATA[&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;SELECT&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;IDX,&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;ORG_FILE_NAME,&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;ROUND(FILE_SIZE/1024,1)&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;AS&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;FILE_SIZE&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;FROM&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;tb_file&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;WHERE&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;BOARD_IDX&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;#{&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;idx}&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;AND&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;DEL_CHK&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color:#52be14&quot;&gt;'N'&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;]]&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;select&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right;margin-top:-13px;margin-right:5px;font-size:9px;font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom;padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;- 06행: 파일 사이즈를 kb로 표시하기 위해 계산이 들어갔다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;boardServiceImpl.java&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#f0f0f0;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important;overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0;padding:0;border:none;background-color:#272727;border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px;border-right:2px solid #4f4f4f&quot;&gt;&lt;div style=&quot;margin:0;padding:0;word-break:normal;text-align:right;color:#aaa;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding: 6px 0px;&quot;&gt;&lt;div style=&quot;margin:0;padding:0;color:#f0f0f0;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@Override&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;Map&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;viewBoardDetail(Map&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;map)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#999999&quot;&gt;//&amp;nbsp;TODO&amp;nbsp;Auto-generated&amp;nbsp;method&amp;nbsp;stub&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;boardDAO.updateHitBoard(map);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Map&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;detail&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;boardDAO.detailBoard(map);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;List&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;Map&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;fileDetail&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;boardDAO.detailFile(map);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Map&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;resultBoard&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;new&lt;/span&gt;&amp;nbsp;HashMap&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;();&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;resultBoard.put(&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;detail&quot;&lt;/span&gt;,&amp;nbsp;detail);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;resultBoard.put(&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;file&quot;&lt;/span&gt;,&amp;nbsp;fileDetail);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;return&lt;/span&gt;&amp;nbsp;resultBoard;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right;margin-top:-13px;margin-right:5px;font-size:9px;font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom;padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(79, 79, 79); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;- 06행: 파일의 정보를 가져온다.&lt;/p&gt;&lt;p&gt;- 08~12행: 게시글이 정보와 파일의 정보를 한 곳에 담아서 내보낸다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;boardController.java&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#f0f0f0;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important;overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0;padding:0;border:none;background-color:#272727;border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px;border-right:2px solid #4f4f4f&quot;&gt;&lt;div style=&quot;margin:0;padding:0;word-break:normal;text-align:right;color:#aaa;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding: 6px 0px;&quot;&gt;&lt;div style=&quot;margin:0;padding:0;color:#f0f0f0;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@RequestMapping(&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;/board/boardDetail&quot;&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;ModelAndView&amp;nbsp;boardDetail(CommandMap&amp;nbsp;commandMap,&amp;nbsp;Criteria&amp;nbsp;cri)&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;throws&lt;/span&gt;&amp;nbsp;Exception&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ModelAndView&amp;nbsp;mv&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;new&lt;/span&gt;&amp;nbsp;ModelAndView(&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;/board/boardDetail&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Map&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#4be6fa&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;resultBoard&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;boardService.viewBoardDetail(commandMap.getMap());&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mv.addObject(&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;detail&quot;&lt;/span&gt;,resultBoard.get(&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;board&quot;&lt;/span&gt;));&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mv.addObject(&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;file&quot;&lt;/span&gt;,resultBoard.get(&lt;span style=&quot;color:#ffd500&quot;&gt;&quot;file&quot;&lt;/span&gt;));&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#999999&quot;&gt;/*&amp;nbsp;생략&amp;nbsp;*/&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;return&lt;/span&gt;&amp;nbsp;mv;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right;margin-top:-13px;margin-right:5px;font-size:9px;font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom;padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(79, 79, 79); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;- 05행: resultBoard에 게시글과 파일정보들을 담는다.&lt;/p&gt;&lt;p&gt;- 06행: 게시글은 detail에 담아서 보낸다.&lt;/p&gt;&lt;p&gt;- 07행: 파일은 file에 담아서 보낸다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;boardDetail.jsp&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important;overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0;padding:0;border:none;background-color:#fafafa;border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px;border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0;padding:0;word-break:normal;text-align:right;color:#666;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;18&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;19&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding: 6px 0px;&quot;&gt;&lt;div style=&quot;margin:0;padding:0;color:#010101;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff7e00&quot;&gt;&amp;lt;%&lt;/span&gt;&lt;span style=&quot;color:#0086b3&quot;&gt;@&lt;/span&gt;&amp;nbsp;taglib&amp;nbsp;prefix&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#993333&quot;&gt;&quot;fn&quot;&lt;/span&gt;&amp;nbsp;uri&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#993333&quot;&gt;&quot;http://java.sun.com/jsp/jstl/functions&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff7e00&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;c:choose&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;c:when&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;test&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;${fn:length(file)&amp;nbsp;&amp;gt;&amp;nbsp;0&amp;nbsp;}&quot;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;div&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;blog-file&quot;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;ul&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;c:forEach&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;items&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;${file&amp;nbsp;}&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;var&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;file&quot;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;li&lt;/span&gt;&amp;gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;span&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;file-img&quot;&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;span&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;div&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;file-info&quot;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;a&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;href&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;'#'&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;i&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;fa&amp;nbsp;fa-camera&quot;&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;i&lt;/span&gt;&amp;gt;&amp;nbsp;${file.ORG_FILE_NAME&amp;nbsp;}&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;a&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;span&lt;/span&gt;&amp;gt;${file.FILE_SIZE&amp;nbsp;}kb&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;span&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;div&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;li&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;c:forEach&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;ul&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;div&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;c:when&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;c:choose&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right;margin-top:-13px;margin-right:5px;font-size:9px;font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom;padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;- 01행: fn 함수를 사용하기 위해 추가해주어야 한다.&lt;/p&gt;&lt;p&gt;- 04행: file이 있을 경우에만 보여주기 위해서 조건문을 넣었다.&lt;/p&gt;&lt;p&gt;- 07~15행: 파일을 보여주 보여주는 부분이다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;10. 실행&lt;/span&gt;&lt;/p&gt;&lt;p&gt;게시글의 내용과 파일을 2개 등록했다. 콘솔로그로 등록되는 쿼리를 확인해보자.&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 640px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/9931BA425DF8652C2E&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F9931BA425DF8652C2E&quot; width=&quot;640&quot; height=&quot;203&quot; filename=&quot;file3.PNG&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;파일을 제외하고 게시글의 내용만 등록하는 쿼리를 볼 수 있다.&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 640px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/998B70425DF8652C34&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F998B70425DF8652C34&quot; width=&quot;640&quot; height=&quot;134&quot; filename=&quot;file4.PNG&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 640px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/9942DE425DF8652D02&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F9942DE425DF8652D02&quot; width=&quot;640&quot; height=&quot;485&quot; filename=&quot;file5.PNG&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;fileUtils 클래스에서 파일의 정보들을 확인할 수 있다. 그리고 파일들이 하나씩 등록되는 것도 볼 수 있다. 파일이 업로드될 디렉토리로 가보면(context-file.xml에 설정함)&amp;nbsp;업로드한 파일들이 랜덤의 이름으로 저장되어 있는 것을 확인할 수 있다.&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 300px; width: 300px; height: 321px;; height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/991CD74C5DF866B20A&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F991CD74C5DF866B20A&quot; width=&quot;300&quot; height=&quot;321&quot; filename=&quot;file6.PNG&quot; filemime=&quot;image/jpeg&quot; style=&quot;width: 300px; height: 321px;&quot; original=&quot;yes&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;파일을 등록한 게시글의 상세페이지에 들어가서 등록한 파일들이 보이면&amp;nbsp;파일 업로드가 완성되었다. 이미지외에도 다른 확장자의 파일들도 저장할 수 있다. 이제 등록된 첨부파일들을 다운로드할 수 있어야 한다. 첨부파일 다운로드는 다음 포스팅에 작성하려고 한다. 얼른 올려야겠당..&lt;/p&gt;</description>
      <category>공부/Spring</category>
      <category>Sping Framework</category>
      <category>스프링</category>
      <category>스프링 프레임워크</category>
      <category>첨부파일 업로드</category>
      <category>파일업로드</category>
      <author>#에게</author>
      <guid isPermaLink="true">https://to-dy.tistory.com/95</guid>
      <comments>https://to-dy.tistory.com/95#entry95comment</comments>
      <pubDate>Tue, 17 Dec 2019 15:22:05 +0900</pubDate>
    </item>
    <item>
      <title>Spring 개발 - 게시판 만들기 #페이징 처리 (2)</title>
      <link>https://to-dy.tistory.com/99</link>
      <description>&lt;p&gt;&lt;a href=&quot;https://to-dy.tistory.com/90&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;이전 게시글&lt;/a&gt;에서 페이징 처리에는 성공했으나, 후 작업이 더 필요해서 게시글을 분리했다. 페이징 원칙 중에 특정 페이지의 한 게시글을 조회하거나 수정, 삭제 처리가 된 후에 다시 목록으로 리다이렉트할 경우, 그 특정 페이지로 이동해야 한다는 원칙이 있다. 그 원칙에도 만족하도록 페이징 개선 작업을 할 것이다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;예를 들어 5페이지에 있는 30번 게시글을 조회하거나 수정한 뒤, 목록으로 돌아가는 버튼을 눌렀다고 해보자. 그러면 이전 글의 게시판일 경우에는 1페이지로 돌아갈 것이다. 그렇게 되면 한 페이지의 여러 게시글들을 읽고 싶다면 매우 불편할 것이다. 그래서 우리는 첫 페이지로 가는게 아니라, 특성 페이지로 이동하도록 작업을 해야한다. 삭제 처리 또한 특정 페이지로 리다이렉트하도록 작업을 할 것이다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class=&quot;txc-textbox&quot; style=&quot;border-style: solid; border-width: 1px; border-color: rgb(234, 234, 234); background-color: rgb(234, 234, 234); padding: 10px;&quot;&gt;&lt;div&gt;현재 페이지 번호 page&lt;/div&gt;&lt;div&gt;페이지당 보여줄 게시글의 갯수 perPageNum&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;특정 페이지의 게시글 목록을 보기 위해서는 위의 정보들이 필요하다. 위의 정보들은 이전 게시글의 Criteria 클래스에서 정의했다. 조회, 수정, 삭제 작업들이 이루어질 때, 목록 페이지의 정보를 유지하기 위해 해당 정보들도 함께 넘어가도록 작업을 할 것이다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style=&quot;font-size: 1.25em;&quot;&gt;1. UriComponents Class&lt;/p&gt;
&lt;p&gt;이 클래스는 URI를 생성할 때 도움이 되는 Spring에서 제공해주는 클래스이다. 쿼리 문자열을 추가해줘서 원하는 URI를 만들 수 있다. 쿼리 문자열은 /board/boardList?IDX=77&amp;amp;page=3&amp;amp;perPageNum=10 주소 URI을 보면 ?(물음표) 뒤에 오는 것들을 말한다. uriComponents를 사용하게 되면 /board/boardDetail${pageMaker.makeQueryPage(page)} 이런식으로 사용이 가능하다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style=&quot;font-size: 1.12em;&quot;&gt;PageMaker&lt;/p&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color: #010101; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position: relative !important; overflow: auto;&quot;&gt;
&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin: 0; padding: 0; border: none; background-color: #fafafa; border-radius: 4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 6px; border-right: 2px solid #e5e5e5;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; word-break: normal; text-align: right; color: #666; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;1&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;2&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;3&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;4&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;5&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;6&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;7&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;8&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;9&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;10&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;11&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;12&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;13&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;14&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;15&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;16&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;17&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;18&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;19&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;20&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;21&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;22&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;padding: 6px 0; text-align: left;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; color: #010101; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #a71d5d;&quot;&gt;class&lt;/span&gt;&amp;nbsp;PageMaker&amp;nbsp;{&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #999999;&quot;&gt;/*&amp;nbsp;생략&amp;nbsp;*/&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #a71d5d;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #066de2;&quot;&gt;String&lt;/span&gt;&amp;nbsp;makeQueryPage(&lt;span style=&quot;color: #066de2;&quot;&gt;int&lt;/span&gt;&amp;nbsp;page)&amp;nbsp;{&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;UriComponents&amp;nbsp;uri&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;=&lt;/span&gt;&amp;nbsp;UriComponentsBuilder.newInstance()&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.queryParam(&lt;span style=&quot;color: #63a35c;&quot;&gt;&quot;page&quot;&lt;/span&gt;,&amp;nbsp;page)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.queryParam(&lt;span style=&quot;color: #63a35c;&quot;&gt;&quot;perPageNum&quot;&lt;/span&gt;,&amp;nbsp;cri.getPerPageNum())&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.build();&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #a71d5d;&quot;&gt;return&lt;/span&gt;&amp;nbsp;uri.toUriString();&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #a71d5d;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #066de2;&quot;&gt;String&lt;/span&gt;&amp;nbsp;makeQueryPage(&lt;span style=&quot;color: #066de2;&quot;&gt;int&lt;/span&gt;&amp;nbsp;idx,&amp;nbsp;&lt;span style=&quot;color: #066de2;&quot;&gt;int&lt;/span&gt;&amp;nbsp;page)&amp;nbsp;{&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;UriComponents&amp;nbsp;uri&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a71d5d;&quot;&gt;=&lt;/span&gt;&amp;nbsp;UriComponentsBuilder.newInstance()&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.queryParam(&lt;span style=&quot;color: #63a35c;&quot;&gt;&quot;idx&quot;&lt;/span&gt;,&amp;nbsp;idx)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.queryParam(&lt;span style=&quot;color: #63a35c;&quot;&gt;&quot;page&quot;&lt;/span&gt;,&amp;nbsp;page)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.queryParam(&lt;span style=&quot;color: #63a35c;&quot;&gt;&quot;perPageNum&quot;&lt;/span&gt;,&amp;nbsp;cri.getPerPageNum())&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.build();&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #a71d5d;&quot;&gt;return&lt;/span&gt;&amp;nbsp;uri.toUriString();&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;}&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: right; margin-top: -13px; margin-right: 5px; font-size: 9px; font-style: italic;&quot;&gt;&lt;a style=&quot;color: #e5e5e5text-decoration:none;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;vertical-align: bottom; padding: 0 2px 4px 0;&quot;&gt;&lt;a style=&quot;text-decoration: none; color: white;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: #e5e5e5; color: white; border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;2개의 메소드를 생성했다. idx가 필요한 uri도 있어서 추가해줬는데, 둘 중에서 첫번째의 메소드만 사용해도 된다. 그렇게 한다면, idx도 필요한 uri는 /board/boardDetail${pageMaker.makeQueryPage(page)}&amp;amp;idx=23 이렇게 뒤에 문자열을 추가해서 보내주면 된다. 나는 idx 포함된 uri 주소를 만들었기 때문에 idx가 필요없으면 page 정보만, idx가 필요하면 idx, page 정보를 넘겨주면 된다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;게시글에 들어가고 나올 때마다 현재 페이지 번호와 페이지당 보여줄 게시글의 갯수를 가지고 있어야 한다. 생성한&amp;nbsp; makeQueryPage() 메소드를 이용해 URI에 정보를 담아갈 수 있게 Controller 및 JSP를 수정해야 한다. 하나씩 수정해보도록 하자. 변경된 부분만 설명을 달았다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style=&quot;font-size: 1.25em;&quot;&gt;2. BoardController.java&lt;/p&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position: relative !important; overflow: auto;&quot;&gt;
&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin: 0; padding: 0; border: none; background-color: #272727; border-radius: 4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 6px; border-right: 2px solid #4f4f4f;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; word-break: normal; text-align: right; color: #aaa; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;1&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;2&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;3&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;4&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;5&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;6&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;7&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;8&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;9&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;10&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;11&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;12&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;13&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;14&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;15&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;16&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;17&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;18&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;19&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;20&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;21&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;22&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;23&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;24&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;25&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;26&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;27&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;28&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;29&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;30&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;31&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;32&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;33&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;34&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;35&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;36&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;37&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;38&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;39&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;40&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;41&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;42&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;43&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;44&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;45&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;46&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;47&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;48&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;49&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;50&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;51&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;52&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;53&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;padding: 6px 0; text-align: left;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; color: #f0f0f0; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@RequestMapping(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;/board/boardDetail&quot;&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;public&lt;/span&gt;&amp;nbsp;ModelAndView&amp;nbsp;boardDetail(CommandMap&amp;nbsp;commandMap,&amp;nbsp;Criteria&amp;nbsp;cri)&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;throws&lt;/span&gt;&amp;nbsp;Exception&amp;nbsp;{&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ModelAndView&amp;nbsp;mv&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;new&lt;/span&gt;&amp;nbsp;ModelAndView(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;/board/boardDetail&quot;&lt;/span&gt;);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Map&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #4be6fa;&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;detail&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;boardService.viewBoardDetail(commandMap.getMap());&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mv.addObject(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;detail&quot;&lt;/span&gt;,detail);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PageMaker&amp;nbsp;pageMaker&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;new&lt;/span&gt;&amp;nbsp;PageMaker();&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;pageMaker.setCri(cri);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mv.addObject(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;page&quot;&lt;/span&gt;,cri.getPage());&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mv.addObject(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;pageMaker&quot;&lt;/span&gt;,&amp;nbsp;pageMaker);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;return&lt;/span&gt;&amp;nbsp;mv;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@RequestMapping(value&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;/board/boardUpdate&quot;&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;public&lt;/span&gt;&amp;nbsp;ModelAndView&amp;nbsp;boardUpdate(CommandMap&amp;nbsp;commandMap,&amp;nbsp;Criteria&amp;nbsp;cri)&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;throws&lt;/span&gt;&amp;nbsp;Exception&amp;nbsp;{&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ModelAndView&amp;nbsp;mv&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;new&lt;/span&gt;&amp;nbsp;ModelAndView(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;/board/boardUpdate&quot;&lt;/span&gt;);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Map&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #4be6fa;&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;detail&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;boardService.selectBoardDetail(commandMap.getMap());&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mv.addObject(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;detail&quot;&lt;/span&gt;,detail);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PageMaker&amp;nbsp;pageMaker&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;new&lt;/span&gt;&amp;nbsp;PageMaker();&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;pageMaker.setCri(cri);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mv.addObject(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;page&quot;&lt;/span&gt;,cri.getPage());&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mv.addObject(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;pageMaker&quot;&lt;/span&gt;,&amp;nbsp;pageMaker);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;return&lt;/span&gt;&amp;nbsp;mv;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@RequestMapping(value&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;/board/boardUpdate&quot;&lt;/span&gt;,&amp;nbsp;method&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;RequestMethod.POST)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;public&lt;/span&gt;&amp;nbsp;ModelAndView&amp;nbsp;boardUpdatePOST(CommandMap&amp;nbsp;commandMap,&amp;nbsp;Criteria&amp;nbsp;cri,&amp;nbsp;RedirectAttributes&amp;nbsp;redAttr)&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;throws&lt;/span&gt;&amp;nbsp;Exception&amp;nbsp;{&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ModelAndView&amp;nbsp;mv&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;new&lt;/span&gt;&amp;nbsp;ModelAndView(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;redirect:/board/boardDetail&quot;&lt;/span&gt;);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mv.addObject(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;idx&quot;&lt;/span&gt;,&amp;nbsp;commandMap.get(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;idx&quot;&lt;/span&gt;));&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;boardService.updateBoard(commandMap.getMap());&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;redAttr.addAttribute(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;page&quot;&lt;/span&gt;,&amp;nbsp;cri.getPage());&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;redAttr.addAttribute(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;perPagNum&quot;&lt;/span&gt;,&amp;nbsp;cri.getPerPageNum());&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;return&lt;/span&gt;&amp;nbsp;mv;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@RequestMapping(value&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;/board/boardDelete&quot;&lt;/span&gt;)&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;public&lt;/span&gt;&amp;nbsp;ModelAndView&amp;nbsp;boardDelete(CommandMap&amp;nbsp;commandMap,&amp;nbsp;Criteria&amp;nbsp;cri,&amp;nbsp;RedirectAttributes&amp;nbsp;redAttr)&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;throws&lt;/span&gt;&amp;nbsp;Exception&amp;nbsp;{&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ModelAndView&amp;nbsp;mv&amp;nbsp;&lt;span style=&quot;color: #0086b3;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #ff3399;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;new&lt;/span&gt;&amp;nbsp;ModelAndView(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;redirect:/board/boardList&quot;&lt;/span&gt;);&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;boardService.deleteBoard(commandMap.getMap());&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;redAttr.addAttribute(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;page&quot;&lt;/span&gt;,&amp;nbsp;cri.getPage());&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;redAttr.addAttribute(&lt;span style=&quot;color: #ffd500;&quot;&gt;&quot;perPagNum&quot;&lt;/span&gt;,&amp;nbsp;cri.getPerPageNum());&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #ff3399;&quot;&gt;return&lt;/span&gt;&amp;nbsp;mv;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: right; margin-top: -13px; margin-right: 5px; font-size: 9px; font-style: italic;&quot;&gt;&lt;a style=&quot;color: #4f4f4ftext-decoration:none;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;vertical-align: bottom; padding: 0 2px 4px 0;&quot;&gt;&lt;a style=&quot;text-decoration: none; color: white;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: #4f4f4f; color: white; border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;- 02, 17행: 이전 목록에 대한 정보를 Criteria 클래스에 담는다.&lt;/p&gt;
&lt;p&gt;- 08~11, 23~26행: PageMaker 인스턴트를 생성하고 현재 페이지와 함께&amp;nbsp; view로 던진다.&lt;/p&gt;
&lt;p&gt;- 32, 45행: 이전 목록에 대한 정보를 Criteria 클래스에 담고, 리다이렉트를 위해 RedirectAttributes 를 사용한다.&lt;/p&gt;
&lt;p&gt;- 38~39, 49~50행: 페이지 정보를 리다이렉트해준다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style=&quot;font-size: 1.25em;&quot;&gt;3. boardList.jsp&lt;/p&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color: #010101; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position: relative !important; overflow: auto;&quot;&gt;
&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin: 0; padding: 0; border: none; background-color: #fafafa; border-radius: 4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 6px; border-right: 2px solid #e5e5e5;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; word-break: normal; text-align: right; color: #666; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;1&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;2&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;3&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;4&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;5&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;6&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;7&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;8&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;9&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;10&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;11&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;12&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;13&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;14&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;15&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;16&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;17&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;18&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;19&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;padding: 6px 0; text-align: left;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; color: #010101; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;td&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;a&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;href&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;'&amp;lt;c:url&amp;nbsp;value='&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;/board/boardDetail${pageMaker.makeQueryPage(bList.IDX,&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;pageMaker.cri.page)&lt;/span&gt;&amp;nbsp;}&lt;span style=&quot;color: #df5000;&quot;&gt;'/&amp;gt;'&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;${bList.TITLE&amp;nbsp;}&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;td&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;ul&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;pagination&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;c:if&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;test&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;${pageMaker.prev&amp;nbsp;}&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;li&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;a&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;href&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;'&amp;lt;c:url&amp;nbsp;value=&quot;/board/boardList${pageMaker.makeQueryPage(pageMaker.startPage-1)&amp;nbsp;}&quot;/&amp;gt;'&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;i&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;fa&amp;nbsp;fa-chevron-left&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;li&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;c:if&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;c:forEach&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;begin&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;${pageMaker.startPage&amp;nbsp;}&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;end&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;${pageMaker.endPage&amp;nbsp;}&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;var&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;pageNum&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;li&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;a&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;href&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;'&amp;lt;c:url&amp;nbsp;value=&quot;/board/boardList${pageMaker.makeQueryPage(pageNum)&amp;nbsp;}&quot;/&amp;gt;'&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;${pageNum&amp;nbsp;}&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;li&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;c:forEach&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;c:if&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;test&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;${pageMaker.next&amp;nbsp;&amp;amp;&amp;amp;&amp;nbsp;pageMaker.endPage&amp;nbsp;&amp;gt;0&amp;nbsp;}&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;li&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;a&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;href&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;'&amp;lt;c:url&amp;nbsp;value=&quot;/board/boardList${pageMaker.makeQueryPage(pageMaker.endPage+1)&amp;nbsp;}&quot;/&amp;gt;'&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;i&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;fa&amp;nbsp;fa-chevron-right&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&amp;gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;li&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;c:if&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;ul&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: right; margin-top: -13px; margin-right: 5px; font-size: 9px; font-style: italic;&quot;&gt;&lt;a style=&quot;color: #e5e5e5text-decoration:none;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;vertical-align: bottom; padding: 0 2px 4px 0;&quot;&gt;&lt;a style=&quot;text-decoration: none; color: white;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: #e5e5e5; color: white; border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;- 01행: 게시글의 상세페이지로 가는 부분에 추가했다.&lt;/p&gt;
&lt;p&gt;- 06, 11, 16행: 페이징 버튼 부분에 추가했다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style=&quot;font-size: 1.25em;&quot;&gt;4. boardDetail.jsp&lt;/p&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color: #010101; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position: relative !important; overflow: auto;&quot;&gt;
&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin: 0; padding: 0; border: none; background-color: #fafafa; border-radius: 4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 6px; border-right: 2px solid #e5e5e5;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; word-break: normal; text-align: right; color: #666; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;1&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;2&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;3&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;padding: 6px 0; text-align: left;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; color: #010101; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;a&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;href&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;'&amp;lt;c:url&amp;nbsp;value='&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;/board/boardUpdate${pageMaker.makeQueryPage(detail.IDX,&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;page)&lt;/span&gt;&amp;nbsp;}&lt;span style=&quot;color: #df5000;&quot;&gt;'/&amp;gt;'&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;수정&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;a&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;href&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;'&amp;lt;c:url&amp;nbsp;value='&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;/board/boardDelete${pageMaker.makeQueryPage(detail.IDX,&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;page)&lt;/span&gt;&amp;nbsp;}&lt;span style=&quot;color: #df5000;&quot;&gt;'/&amp;gt;'&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;삭제&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;a&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;href&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;'&amp;lt;c:url&amp;nbsp;value='&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;/board/boardList${pageMaker.makeQueryPage(page)&lt;/span&gt;&amp;nbsp;}&lt;span style=&quot;color: #df5000;&quot;&gt;'/&amp;gt;'&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;목록으로&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;vertical-align: bottom; padding: 0 2px 4px 0;&quot;&gt;&lt;a style=&quot;text-decoration: none; color: white;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: #e5e5e5; color: white; border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;수정, 삭제의 경우는 게시글의 idx도 넘어가야하기 때문에 idx 정보도 포함해서 넘겨준다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style=&quot;font-size: 1.25em;&quot;&gt;5. boardUpdate.jsp&lt;/p&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color: #010101; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position: relative !important; overflow: auto;&quot;&gt;
&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin: 0; padding: 0; border: none; background-color: #fafafa; border-radius: 4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 6px; border-right: 2px solid #e5e5e5;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; word-break: normal; text-align: right; color: #666; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;1&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;2&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;3&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;4&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;5&lt;/div&gt;
&lt;div style=&quot;line-height: 130%;&quot;&gt;6&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;padding: 6px 0; text-align: left;&quot;&gt;
&lt;div style=&quot;margin: 0; padding: 0; color: #010101; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height: 130%;&quot;&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;form&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;action&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;'&amp;lt;c:url&amp;nbsp;value='&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;/board/boardUpdate${pageMaker.makeQueryPage(page) &lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #df5000;&quot;&gt;'/&amp;gt;'&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;method&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;post&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #999999;&quot;&gt;&amp;lt;!--&amp;nbsp;생략&amp;nbsp;--&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;input&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;hidden&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;idx&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;${detail.IDX&amp;nbsp;}&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;button&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;submit&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;&quot;btn&amp;nbsp;btn-default&quot;&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;수정하기&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;button&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;a&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #0a9989;&quot;&gt;href&lt;/span&gt;=&lt;span style=&quot;color: #df5000;&quot;&gt;'&amp;lt;c:url&amp;nbsp;value='&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;/board/boardDetail${pageMaker.makeQueryPage(detail.IDX, page)&lt;/span&gt;&amp;nbsp;}&lt;span style=&quot;color: #df5000;&quot;&gt;'/&amp;gt;'&lt;/span&gt;&lt;span style=&quot;color: #0a9989;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;이전으로&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;padding: 0 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #066de2;&quot;&gt;form&lt;/span&gt;&lt;span style=&quot;color: #010101;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: right; margin-top: -13px; margin-right: 5px; font-size: 9px; font-style: italic;&quot;&gt;&lt;a style=&quot;color: #e5e5e5text-decoration:none;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td style=&quot;vertical-align: bottom; padding: 0 2px 4px 0;&quot;&gt;&lt;a style=&quot;text-decoration: none; color: white;&quot; href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: #e5e5e5; color: white; border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;- 01행: idx도 넘어가야 하는데, input hidden 으로 보내주고 있기 때문에 uri에는 포함시키지 않았다.&lt;/p&gt;
&lt;p&gt;- 08행: 이전 상세페이지로 돌아가는 부분에 추가했다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style=&quot;font-size: 1.25em;&quot;&gt;6. 확인&lt;/p&gt;
&lt;p&gt;이제 상세 페이지에 들어가보고 수정, 삭제, 목록으로, 이전으로 버튼을 눌러서 되는 지 테스트해보면 된다. 수정, 삭제가 되는 걸 보여주는 건 의미없어 보이고, uri이 잘 생성 되었는 지 확인하려고 한다. 개발자 모드(F12)를 켜서 uri를 확인해보자.&lt;/p&gt;
&lt;p&gt;&lt;figure class=&quot;imageblock alignLeft&quot; data-origin-width=&quot;0&quot; data-origin-height=&quot;0&quot; width=&quot;442&quot; height=&quot;80&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/biZgrU/btqz9sPef0V/wbHVx31yLfYubVJQAHLWZ0/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/biZgrU/btqz9sPef0V/wbHVx31yLfYubVJQAHLWZ0/img.png&quot; data-alt=&quot;상세페이지에 들어가는 uri&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/biZgrU/btqz9sPef0V/wbHVx31yLfYubVJQAHLWZ0/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbiZgrU%2Fbtqz9sPef0V%2FwbHVx31yLfYubVJQAHLWZ0%2Fimg.png&quot; data-origin-width=&quot;0&quot; data-origin-height=&quot;0&quot; width=&quot;442&quot; height=&quot;80&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;figcaption&gt;상세페이지에 들어가는 uri&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure class=&quot;imageblock alignLeft&quot; data-origin-width=&quot;0&quot; data-origin-height=&quot;0&quot; width=&quot;506&quot; height=&quot;233&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/kCaOg/btqz9IxudGM/SegsEPKaSy9lHuwikHMXG1/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/kCaOg/btqz9IxudGM/SegsEPKaSy9lHuwikHMXG1/img.png&quot; data-alt=&quot;페이징 버튼 부분 uri&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/kCaOg/btqz9IxudGM/SegsEPKaSy9lHuwikHMXG1/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FkCaOg%2Fbtqz9IxudGM%2FSegsEPKaSy9lHuwikHMXG1%2Fimg.png&quot; data-origin-width=&quot;0&quot; data-origin-height=&quot;0&quot; width=&quot;506&quot; height=&quot;233&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;figcaption&gt;페이징 버튼 부분 uri&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure class=&quot;imageblock alignLeft&quot; data-origin-width=&quot;0&quot; data-origin-height=&quot;0&quot; width=&quot;518&quot; height=&quot;93&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/dyqVhE/btqAaURKqLD/H0eUwGAi3Q5UPrfOonG4pK/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/dyqVhE/btqAaURKqLD/H0eUwGAi3Q5UPrfOonG4pK/img.png&quot; data-alt=&quot;상세페이지의 수정,삭제,목록 uri&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/dyqVhE/btqAaURKqLD/H0eUwGAi3Q5UPrfOonG4pK/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FdyqVhE%2FbtqAaURKqLD%2FH0eUwGAi3Q5UPrfOonG4pK%2Fimg.png&quot; data-origin-width=&quot;0&quot; data-origin-height=&quot;0&quot; width=&quot;518&quot; height=&quot;93&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;figcaption&gt;상세페이지의 수정,삭제,목록 uri&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;이처럼 uri들이 적용되어 있는 것을 확인할 수 있다. idx가 포함되어 있는 uri도 있고, 페이지 정보만 담겨있는 uri도 확인할 수 있다. uriComponents 클래스의 경우는 다른 곳에서도 쓰일 수 있을 거 같아서 더 연구해보면 좋을 거 같다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
      <category>공부/Spring</category>
      <category>Paging</category>
      <category>Sping Framework</category>
      <category>게시판 페이징</category>
      <category>스프링 페이징</category>
      <category>스프링 프레임워크</category>
      <category>페이징</category>
      <author>#에게</author>
      <guid isPermaLink="true">https://to-dy.tistory.com/99</guid>
      <comments>https://to-dy.tistory.com/99#entry99comment</comments>
      <pubDate>Mon, 2 Dec 2019 17:04:20 +0900</pubDate>
    </item>
    <item>
      <title>티스토리 앱 알람이 왜 안오냐ㅠㅠ?</title>
      <link>https://to-dy.tistory.com/98</link>
      <description>&lt;p&gt;아니 ㅠㅠ 댓글 알람이 하나도 안와서 답변을 제때 못해드렸잖아 ㅠㅠ&lt;/p&gt;
&lt;p&gt;요즘 바빠서 티스토리 앱 알림만 믿고 있었는데 와.. 하나도 알람이 안왔어... 미친... 아악!!&lt;/p&gt;
&lt;p&gt;잠시 여유가 생겨서 들어와봤더니... 이게 무슨 일이람ㅠㅠ&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;답변 늦어서 죄송함니다.. 티스토리.. ㅂㄷㅂㄷ...&lt;/p&gt;
&lt;style type=&quot;text/css&quot;&gt;
  .kakao_ad_area { visibility: hidden; }
&lt;/style&gt;</description>
      <category>일지</category>
      <author>#에게</author>
      <guid isPermaLink="true">https://to-dy.tistory.com/98</guid>
      <comments>https://to-dy.tistory.com/98#entry98comment</comments>
      <pubDate>Tue, 9 Apr 2019 11:45:15 +0900</pubDate>
    </item>
    <item>
      <title>Spring Security - 로그인 성공 후 부가 작업</title>
      <link>https://to-dy.tistory.com/94</link>
      <description>&lt;p&gt;로그인에 성공했을 때의 부가작업도 해보려고 한다. 마찬가지로 Spring Security에서 제공하는 AuthenticationSuccessHandler 인터페이스를 구현할 것이다. 따라서 실패 핸들러를 구현할 때와 비슷하다고 생각하며 된다. 그리고 해당 인터페이스에서 오버라이드하는 메서드에서도&amp;nbsp;3가지의 객체가 넘어오는데, 실패 핸들러와는 조금의 차이가 있을 뿐이다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;txc-textbox&quot; style=&quot;border-style: dashed; border-width: 1px; border-color: rgb(193, 193, 193); background-color: rgb(238, 238, 238); padding: 10px;&quot;&gt;&lt;p&gt;HttpServletRequest 객체: 웹에서 넘어온 Request 값을 가지고 있는 객체&lt;/p&gt;&lt;p&gt;HttpServletResponse 객체: 출력을 정의할 수 있는 객체&lt;/p&gt;&lt;p&gt;Authentication 객체: 인증에 성공한 사용자의 정보를 가지고 있는 객체&lt;/p&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;AuthenticationFailureHandler 인터페이스에는 로그인 실패 정보를 가지고 있었다면, AuthenticationSuccessHandler 인터페이스에는 로그인 성공 정보를 가지고 있다. 차이가 많이 나는 것이 아니기 때문에 큰 어려움은 없을 것이다. 다만, 성공 핸들러를 구현할때에는 기본적으로 해야하는 것이 있다. 로그인에 성공 후 이동할 URL을 지정하여 지정한 URL로 이동해야 한다. 로그인에 성공했을 때 이동할 곳은 다 다르다. 로그인 버튼을 눌러 직접 로그인화면으로 갔다면 성공 후엔 메인 화면으로 가야 할 것이고, 권한이 필요한 곳에 접근하여 강제로 로그인 화면으로 이동했다면 성공 후엔 그 권한이 필요했던 곳으로 가야한다. 그리고 혹시나 있을 에러 세션을 지우는 작업도 해줘야 한다. 기본적으로 2가지를 작업하고 다른 추가적인 부가 작업을 해주려고 한다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;txc-textbox&quot; style=&quot;border-style: dashed; border-width: 1px; border-color: rgb(203, 203, 203); background-color: rgb(255, 255, 255); padding: 10px;&quot;&gt;&lt;p&gt;1. 로그인 성공시,&amp;nbsp;어떤 URL로 Redirect 할 지 결정&lt;/p&gt;&lt;p&gt;2. 로그인 실패 에러 세션 지우기&lt;/p&gt;&lt;p&gt;3. 로그인 성공시, 실패 카운터 초기화&lt;/p&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;그리고 나는 여기서 추가적으로&amp;nbsp;마지막 접속 날짜를 갱신하는 로직을 추가했다. 생략한 이유는 실패 카운터 초기화 작업과 다를 게 없다. 그렇기 때문에 방문 카운터를 증가시키거나 방문자 수를 업데이트 하는 등 실패 카운터 초기화 작업의 과정을 보면서 자신이 원하는 부가 작업을 추가하면 된다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;파라미터 설정&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;LoginSuccessHandler.java&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;18&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;19&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;20&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;21&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;22&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;23&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;24&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;25&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;26&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;27&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;class&lt;/span&gt;&amp;nbsp;LoginSuccessHandler&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;implements&lt;/span&gt;&amp;nbsp;AuthenticationSuccessHandler&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;private&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;loginidname;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;private&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;defaultUrl;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@Override&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;void&lt;/span&gt;&amp;nbsp;onAuthenticationSuccess(HttpServletRequest&amp;nbsp;request,&amp;nbsp;HttpServletResponse&amp;nbsp;response,&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Authentication&amp;nbsp;authentication)&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;throws&lt;/span&gt;&amp;nbsp;IOException,&amp;nbsp;ServletException&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;getLoginidname()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;return&lt;/span&gt;&amp;nbsp;loginidname;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;void&lt;/span&gt;&amp;nbsp;setLoginidname(&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;loginidname)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;this&lt;/span&gt;.loginidname&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;loginidname;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;getDefaultUrl()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;return&lt;/span&gt;&amp;nbsp;defaultUrl;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;void&lt;/span&gt;&amp;nbsp;setDefaultUrl(&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;defaultUrl)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;this&lt;/span&gt;.defaultUrl&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;defaultUrl;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;Security 설정&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;context-security.xml&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;security:form-login&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;username-parameter&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;loginId&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;password-parameter&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;loginPwd&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;login-processing-url&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;/login&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;login-page&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;/secu/loginPage&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;authentication-failure-handler-ref&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;loginFailureHandler&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;authentication-success-handler-ref&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;loginSuccessHandler&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;/&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;bean&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;loginSuccessHandler&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;tody.common.handler.LoginSuccessHandler&quot;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;property&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;loginidname&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;loginId&quot;&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;/&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;property&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;defaultUrl&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;/&quot;&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;/&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;bean&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;- 07행: authentication-success-handler-ref 속성을 추가해준다. 해당 핸들러를 통해 default url이 설정되기 때문에 default-target-url 속성은 필요가 없어진다.&lt;/p&gt;&lt;p&gt;- 10행: AuthenticationSuccessHandler 인터페이스를 구현할 클래스를 &amp;lt;bean&amp;gt; 등록해준다.&lt;/p&gt;&lt;p&gt;- 11, 12행: 사용할 파라미터 값들을 설정해준다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;1. 로그인 성공시, 어떤 URL로 Redirect 할 지 결정&lt;/span&gt;&lt;/p&gt;&lt;p&gt;로그인에 성공하고 난 후, 가야 할 이동 경로는 어떻게 로그인 화면에 접근했느냐에 따라 다르다. 또한 어떻게 설정해주냐에 따라 달라질 수도 있다. 로그인에 성공하면 무조건 메인 화면으로 간다던지, 로그인 성공 화면을 띄워준다 던지 등등 어떤 경우에 어떤 url로 보낼 지 결정하고 만드는 게 좋다. 나는 2가지의 경우로 나누어 redirect 시킬 것이다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;txc-textbox&quot; style=&quot;border-style: dashed; border-width: 1px; border-color: rgb(203, 203, 203); background-color: rgb(255, 255, 255); padding: 10px;&quot;&gt;&lt;p&gt;- 인증 권한이 필요한 페이지에 접근했을 때&lt;/p&gt;&lt;p&gt;- 직접 로그인 페이지로 접근했을 때&lt;/p&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;먼저 인증 권한이 필요한 페이지에 접근하게 되면, 로그인 화면을 띄우기 전에 필요한 정보들을 세션에 저장하게 된다. spring security에서 제공하는 사용자의 요청을 저장하고 꺼낼 수 있는 RequestCache 인터페이스를 이용해, 사용자 요청 정보들이 들어 있는 SavedRequest 클래스 객체를 세션에 저장하게 된다. 그럼 우리는 RequestCache 객체를 생성해 SavedRequest 객체를 가져와서 로그인 화면을 보기 전에 방문했던 URL 정보를 가져오면 된다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;다음으로는 직접 로그인 페이지로 접근했을 때 즉, 인증 권한을 위해 로그인 화면을 자동으로 띄워주는 것이 아니라 직접 로그인 url을 통해 이동했을 경우에는 세션에 저장되지 않기 때문에 SavedRequest 객체로는 URL 정보를 가져올 수 없다. 이런 경우에는 HttpServletRequest 객체의 getHeader 메소드를 이용해서 REFERER 헤더 값을 읽어 올 수 있다. REFERER 헤더 값은 이전 페이지 URL을 가져오는 데 가장 보편적인 방법이다. 하지만 로그인에 관한 작업을&amp;nbsp;할 때에는 REFERER 헤더 값을 이용하는 걸 추천하지 않는다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;로그인 화면에서 &amp;lt;form&amp;gt; 태그로 action을 지정했었다. 로그인 버튼을 누르게 되면 해당 action 을 통해 로그인 처리 과정이 이루어질 것이다. 여기서 문제가 발생한다. 이렇게 로그인에 성공하게 되면 REFERER 헤더 값은 어떤 url이 저장되어 있을까? 바로 로그인 화면 url이 저장되어 있다. 따라서 직접 로그인 했을 때 redirect 로 REFERER 헤더 값을 지정한다면, 로그인에 성공하게 되도 다시 로그인 화면을 보여주게 된다. 그렇기 때문에 REFERER 헤더 값을 사용하는 것은 로그인 처리에서는 별로 좋지 못하다. 따라서 우리는 지정된 화면으로 이동하게 만들어 줄 것이다. security 설정에서 defalut-target-url 을 설정한 적이 있다. 로그인 성공시 이동할 url을 설정했는데, 이 url로 이동하게 해주면 된다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;LoginSuccessHandler.java&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;18&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;19&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;20&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;21&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;22&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;23&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;24&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;25&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;26&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;27&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;28&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;29&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;30&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;31&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;32&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;33&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;class&lt;/span&gt;&amp;nbsp;LoginSuccessHandler&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;implements&lt;/span&gt;&amp;nbsp;AuthenticationSuccessHandler&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;private&lt;/span&gt;&amp;nbsp;RequestCache&amp;nbsp;requestCache&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;new&lt;/span&gt;&amp;nbsp;HttpSessionRequestCache();&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;private&lt;/span&gt;&amp;nbsp;RedirectStrategy&amp;nbsp;redirectStratgy&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;new&lt;/span&gt;&amp;nbsp;DefaultRedirectStrategy();&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@Override&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;void&lt;/span&gt;&amp;nbsp;onAuthenticationSuccess(HttpServletRequest&amp;nbsp;request,&amp;nbsp;HttpServletResponse&amp;nbsp;response,&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Authentication&amp;nbsp;authentication)&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;throws&lt;/span&gt;&amp;nbsp;IOException,&amp;nbsp;ServletException&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;resultRedirectStrategy(request,&amp;nbsp;response,&amp;nbsp;authentication);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;protected&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;void&lt;/span&gt;&amp;nbsp;resultRedirectStrategy(HttpServletRequest&amp;nbsp;request,&amp;nbsp;HttpServletResponse&amp;nbsp;response,&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Authentication&amp;nbsp;authentication)&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;throws&lt;/span&gt;&amp;nbsp;IOException,&amp;nbsp;ServletException&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SavedRequest&amp;nbsp;savedRequest&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;requestCache.getRequest(request,&amp;nbsp;response);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;if&lt;/span&gt;(savedRequest&lt;span style=&quot;color:#ff3399&quot;&gt;!&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;null&lt;/span&gt;)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;targetUrl&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;savedRequest.getRedirectUrl();&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;redirectStratgy.sendRedirect(request,&amp;nbsp;response,&amp;nbsp;targetUrl);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;else&lt;/span&gt;&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;redirectStratgy.sendRedirect(request,&amp;nbsp;response,&amp;nbsp;defaultUrl);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;- 03행: RequestCache 객체를 생성한다.&lt;/p&gt;&lt;p&gt;- 04행: RedirectStratgy 객체를 생성한다.&lt;/p&gt;&lt;p&gt;- 14행: redirect url 작업을 위한 메서드를 호출한다.&lt;/p&gt;&lt;p&gt;- 23행: RequestCache 객체를 통해 SavedRequest 객체를 가져온다.&amp;nbsp;&lt;/p&gt;&lt;p&gt;- 25행: 세션에 이동할 url의 정보가 담겨져 있을때 즉,&amp;nbsp;인증 권한이 필요한 페이지에 접근했을 경우를 뜻한다.&lt;/p&gt;&lt;p&gt;- 26행: savedRequest 객체를 통해 getRedirectUrl (로그인화면을 보기 전에 갔던 url)을 가져온다.&lt;/p&gt;&lt;p&gt;- 28행: 직접 로그인 화면으로 이동했을 경우를 뜻한다.&lt;/p&gt;&lt;p&gt;- 27, 29행: 화면 이동을 위해 redirectStratgy 의 sendRedirect 를 재정의해준다. 각각에 알맞은 url 정보를 넣어주면 된다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;spring security에서 자동적으로 해주던 부분을 커스터마이징 해주면서 우리가 직접 경로를 설정하게 된 것이다. 만약에 권한에 따라 서로 다른 페이지로 이동하게 하고 싶으면 인증에 성공한 사용자의 권한을 이용해서 원하는 url로 보내주면 된다. 어떨 때 어디로 보낼 지 먼저 정해놓고 시작한다면&amp;nbsp;어렵지 않게 원하는대로 커스터마이징할 수 있을 것이다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;2. 로그인 실패 에러 세션 지우기&lt;/span&gt;&lt;/p&gt;&lt;p&gt;로그인을 하는 과정에서 한번만에 로그인에 성공할 수도 있지만, 실패를 한 후 로그인에 성공하는 경우도 있다.&amp;nbsp;이처럼 로그인에 실패하는&amp;nbsp;상황이 한번이라도 발생한다면,&amp;nbsp;에러가 세션에 저장되어 남아있게 된다.&amp;nbsp;로그인에 성공했다고 하지만&amp;nbsp;이렇게 세션에 에러가 남겨진 채로 넘어갈 수는 없다.&amp;nbsp;따라서 로그인 성공 핸들러에서 에러 세션을 지우는 작업을 해줘야&amp;nbsp;한다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;LoginSuccessHandler.java&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;@Override&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;void&lt;/span&gt;&amp;nbsp;onAuthenticationSuccess(HttpServletRequest&amp;nbsp;request,&amp;nbsp;HttpServletResponse&amp;nbsp;response,&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Authentication&amp;nbsp;authentication)&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;throws&lt;/span&gt;&amp;nbsp;IOException,&amp;nbsp;ServletException&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;clearAuthenticationAttributes(request);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;protected&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;void&lt;/span&gt;&amp;nbsp;clearAuthenticationAttributes(HttpServletRequest&amp;nbsp;request)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;HttpSession&amp;nbsp;session&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;request.getSession(&lt;span style=&quot;color:#308ce5&quot;&gt;false&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;if&lt;/span&gt;(session&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;null&lt;/span&gt;)&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;return&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;session.removeAttribute(WebAttributes.AUTHENTICATION_EXCEPTION);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;- 05행: 에러 세션을 지우는 메서드를 실헹한다.&lt;/p&gt;&lt;p&gt;- 10행: 세션을 받아온다.&lt;/p&gt;&lt;p&gt;- 11행: 세션이 null 즉, 세션에 에러가 없다면 그냥 return 된다.&lt;/p&gt;&lt;p&gt;- 12행: WebAttributes.AUTHENTICATION_EXCEPTION 이름 값으로 정의된 세션을 지운다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;3. 로그인 성공시, 실패 카운터 초기화&lt;/span&gt;&lt;/p&gt;&lt;p&gt;로그인 실패 핸들러에서 로그인에 실패 시, 실패 카운터를 증가시켰다. 그런데 실패 카운터가 증가된 상태로&amp;nbsp;로그인에 성공하게 되면, 다음번에 로그인할 때는 더 적은 실패 기회를 얻게 될 것이다.&amp;nbsp;따라서&amp;nbsp;로그인을&amp;nbsp;시도할 때마다 같은 시도 횟수를 주려고 한다면, 로그인에 성공할 때 실패 카운터를 초기화해야 한다.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;LoginSuccessHandler.java&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;@Resource(name&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#993333&quot;&gt;&quot;userSer&quot;&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;private&lt;/span&gt;&amp;nbsp;UserService&amp;nbsp;userSer;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;@Override&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;void&lt;/span&gt;&amp;nbsp;onAuthenticationSuccess(HttpServletRequest&amp;nbsp;request,&amp;nbsp;HttpServletResponse&amp;nbsp;response,&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Authentication&amp;nbsp;authentication)&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;throws&lt;/span&gt;&amp;nbsp;IOException,&amp;nbsp;ServletException&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;username&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;request.getParameter(loginidname);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;userSer.resetFailureCnt(username);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;Service 영역&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;//UserService&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;void&lt;/span&gt;&amp;nbsp;resetFailureCnt(&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;username);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;//UserServiceImpl&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;@Override&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;void&lt;/span&gt;&amp;nbsp;resetFailureCnt(&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;username)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;userDAO.updateFailureCountReset(username);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px;&quot;&gt;UserDAO.java&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;void&lt;/span&gt;&amp;nbsp;updateFailureCountReset(&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;username)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sqlSession.update(&lt;span style=&quot;color:#993333&quot;&gt;&quot;user.updateFailureCountReset&quot;&lt;/span&gt;,&amp;nbsp;username);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;user_sql.xml&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;update&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;updateFailureCountReset&quot;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;![CDATA[&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;UPDATE&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;user&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;SET&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;FAILURE_CNT&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;0&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;WHERE&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;ID&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;#{&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;loginId}&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;]]&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;update&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;이런 로직 작업은 정말 껌일 것이다. 그래서 따로 설명하지 않고 로직이 어디에 들어가야 하는 지만 잘 알아두면 언제든지 하고 싶은대로 커스텀 할 수 있다. 프로젝트를 실행시켜서 테스트를 해보자. 실패 카운터도 초기화 되고, url도 생각한 것처럼 이동되면 완성된 것이다!&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/todyDev/Spring-Security/tree/v2.1.32&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;GitHub&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: border-box; font-family: &amp;quot;Malgun Gothic&amp;quot;, &amp;quot;맑은 고딕&amp;quot;, 굴림, gulim, 돋움, dotum, &amp;quot;Microsoft NeoGothic&amp;quot;, &amp;quot;Droid sans&amp;quot;, sans-serif; letter-spacing: -0.5px; font-size: 8pt; color: rgb(189, 189, 189);&quot;&gt;참고 :&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://zgundam.tistory.com/category/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D/Spring%20Security&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot; style=&quot;box-sizing: border-box; color: rgb(129, 169, 219); border-bottom-style: solid; border-bottom-color: rgb(129, 169, 219); font-family: &amp;quot;Malgun Gothic&amp;quot;, &amp;quot;맑은 고딕&amp;quot;, 굴림, gulim, 돋움, dotum, &amp;quot;Microsoft NeoGothic&amp;quot;, &amp;quot;Droid sans&amp;quot;, sans-serif; font-size: 14px; letter-spacing: -0.5px; border-top-color: rgb(129, 169, 219) !important; border-right-color: rgb(129, 169, 219) !important; border-left-color: rgb(129, 169, 219) !important;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-size: 8pt; color: rgb(189, 189, 189);&quot;&gt;사랑이 고픈 프로그래머..&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <category>공부/Spring Security</category>
      <category>AuthenticationSuccessHandler</category>
      <category>Spring Framework</category>
      <category>Spring security 4</category>
      <category>스프링</category>
      <category>스프링 시큐리티 4</category>
      <author>#에게</author>
      <guid isPermaLink="true">https://to-dy.tistory.com/94</guid>
      <comments>https://to-dy.tistory.com/94#entry94comment</comments>
      <pubDate>Tue, 8 Jan 2019 17:21:48 +0900</pubDate>
    </item>
    <item>
      <title>Spring Security - 로그인 실패 후 부가 작업</title>
      <link>https://to-dy.tistory.com/92</link>
      <description>&lt;p&gt;로그인에 실패했을 때 에러 메시지만 보여줘도 되지만 나는 추가적인 부가 작업을 해보려고 한다. 로그인에 실패했을 때 부가적인 작업을 할 수 있는 인터페이스를 Spring Security 에서 제공한다. 마찬가지로 로그인 실패 작업을 커스터마이징 한다고 생각하면 된다. 물론 필요가 없으면 사용하지 않아도 되지만, 대부분은 부가 작업을 하게 될 것이다.&amp;nbsp;나는 아래의 3개의 작업을 할 것이다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;txc-textbox&quot; style=&quot;border-style: dashed; border-width: 1px; border-color: rgb(203, 203, 203); background-color: rgb(255, 255, 255); padding: 10px;&quot;&gt;&lt;p&gt;1. 로그인 실패시 입력한 로그인 정보 띄우기&lt;/p&gt;&lt;p&gt;2. 세션을 이용하지 않고 에러 메시지 보여주기&lt;/p&gt;&lt;p&gt;3. 비밀번호를 3번 이상 틀릴시 계정 잠금 처리&lt;/p&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Spring security 에서 제공하는 AuthenticationFailureHandler 인터페이스를 구현하게 되면 onAuthenticationFailure() 메서드를 오버라이드 받게 된다. 즉, 로그인에 실패하게 되면 해당 메서드가 실행이 되는 것이다. 해당 메서드에서 넘어오는 객체는 3가지가 있다. 해당 객체들을 이용해서 정보를 가져오고 추가작업들을 하면 된다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;txc-textbox&quot; style=&quot;border-style: dashed; border-width: 1px; border-color: rgb(193, 193, 193); background-color: rgb(238, 238, 238); padding: 10px;&quot;&gt;&lt;p&gt;HttpServletRequest 객체: 웹에서 넘어온 Request 값을 가지고 있는 객체&lt;/p&gt;&lt;p&gt;HttpServletResponse 객체: 출력을 정의할 수 있는 객체&lt;/p&gt;&lt;p&gt;AuthenticationException 객체: 로그인 실패 정보를 가지고 있는 객체&lt;/p&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;HttpServletReqeust 객체를 이용해서 웹에서 넘오는 로그인 정보들을 메서드(getParameter)를 이용해서 가져올 수 있다. 이렇게 가져온 값들을 그대로 다시 셋팅(setAttribute)해서 다시 웹으로 넘겨주면 된다. 또한 AuthenticationException 객체를 통해&amp;nbsp;실패 메시지를&amp;nbsp;가져와서 다시 셋팅하여 웹으로 보내면 된다. 이렇게 셋팅한 값들을 메서드(getRequestDispatcher)를 통해 보여줄 화면으로 forward 해주면, jstl을 이용해서 셋팅한 값들을 보여줄 수 있다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;먼저 4가지의 파라미터를 설정할 것이다.&amp;nbsp; 우리가 필요한 정보들을 불러올 때 사용하는 파라미터라고 생각하면 된다. 다시말해,&amp;nbsp;이 파라미터들을 이용해서 각각의 값들을 불러오게 된다. 이렇게 불러온 값들을 샛팅해서 보여줄 페이지에 jstl을 이용해서 보여주면 된다.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;파라미터 설정&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;18&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;19&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;20&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;21&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;22&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;23&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;24&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;25&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;26&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;27&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;28&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;29&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;30&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;31&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;32&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;33&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;34&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;35&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;36&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;37&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;38&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;39&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;40&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;41&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;42&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;43&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;44&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;45&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;class&lt;/span&gt;&amp;nbsp;LoginFailureHandler&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;implements&lt;/span&gt;&amp;nbsp;AuthenticationFailureHandler&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;private&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;loginidname;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;private&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;loginpwdname;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;private&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;errormsgname;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;private&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;defaultFailureUrl;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@Override&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;void&lt;/span&gt;&amp;nbsp;onAuthenticationFailure(HttpServletRequest&amp;nbsp;request,&amp;nbsp;HttpServletResponse&amp;nbsp;response,&amp;nbsp;AuthenticationException&amp;nbsp;exception)&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;throws&lt;/span&gt;&amp;nbsp;IOException,&amp;nbsp;ServletException&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;getLoginidname()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;return&lt;/span&gt;&amp;nbsp;loginidname;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;void&lt;/span&gt;&amp;nbsp;setLoginidname(&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;loginidname)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;this&lt;/span&gt;.loginidname&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;loginidname;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;getLoginpwdname()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;return&lt;/span&gt;&amp;nbsp;loginpwdname;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;void&lt;/span&gt;&amp;nbsp;setLoginpwdname(&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;loginpwdname)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;this&lt;/span&gt;.loginpwdname&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;loginpwdname;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;getErrormsgname()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;return&lt;/span&gt;&amp;nbsp;errormsgname;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;void&lt;/span&gt;&amp;nbsp;setErrormsgname(&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;errormsgname)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;this&lt;/span&gt;.errormsgname&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;errormsgname;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;getDefaultFailureUrl()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;return&lt;/span&gt;&amp;nbsp;defaultFailureUrl;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;void&lt;/span&gt;&amp;nbsp;setDefaultFailureUrl(&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;defaultFailureUrl)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;this&lt;/span&gt;.defaultFailureUrl&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;defaultFailureUrl;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;- 03행: HttpServletRequest 에서 로그인 아이디가 저장되어 있는 파라미터 이름. 아이디값이 들어오는 input 태그 name&lt;/p&gt;&lt;p&gt;- 04행: HttpServletRequest 에서 로그인 비밀번호가 저장되어 있는 파라미터 이름. 비밀번호값이 들어오는 input 태그 name&lt;/p&gt;&lt;p&gt;- 05행: 로그인 페이지에서 jstl을 이용하여 에러메시지를 가져올 때 사용할 변수 이름.&lt;/p&gt;&lt;p&gt;- 06행: 실패시 보여줄 화면 url&amp;nbsp;&lt;/p&gt;&lt;p&gt;- 13~43행: 파라미터들의 getter/setter이다. getter/setter가 존재하지 않으면 &amp;lt;bean&amp;gt; 등록시 &amp;lt;property&amp;gt; 태그에 오류가 발생한다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;security 설정&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;context-security.xml&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;security:form-login&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;username-parameter&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;loginId&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;password-parameter&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;loginPwd&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;login-processing-url&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;/login&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;login-page&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;/secu/loginPage&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;default-target-url&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;/&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;authentication-failure-handler-ref&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;loginFailureHandler&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;/&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;bean&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;loginFailureHandler&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;tody.common.handler.LoginFailureHandler&quot;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;property&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;loginidname&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;loginId&quot;&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;/&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;property&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;loginpwdname&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;loginPwd&quot;&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;/&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;property&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;errormsgname&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;ERRORMSG&quot;&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;/&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;property&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;defaultFailureUrl&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;/secu/loginPage?error&quot;&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;/&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;bean&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;- 07행: authentication-failure-handler-ref 속성에 &amp;lt;bean&amp;gt;태그로 등록한&amp;nbsp;값을 설정한다. authenticaton-failure-url 속성을 사용해서 로그인에 실패했을 때 호출할 url을 설정했다면, authentication-failure-url 속성이 필요가 없어진다.&amp;nbsp;우리가 앞서 설정한 파라미터 중 defaultFailureUrl 이 해당 역할을 해줄 것이다.&lt;/p&gt;&lt;p&gt;- 10행: AuthenticationFailureHandler 인터페이스를 구현한 클래스를 &amp;lt;bean&amp;gt; 태그를 이용해 등록한다.&lt;/p&gt;&lt;p&gt;- 11~14행: 4가지의 파라미터 값들을 셋팅해주었다. 이것은 웹에서 넘어온 input 태그의 이름, 혹은 지정한 url 페이지이다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;1. 로그인 실패시 입력한 로그인 정보 띄우기&lt;/span&gt;&lt;/p&gt;&lt;p&gt;HttpServletRequest 객체의 getParameter 메서드를 이용하여 사용자가 입력한 로그인 아이디와 비밀번호를 가져오면 된다. 아이디와 비밀번호 input 태그의 name을 이용해거 가져오면 된다. 앞서 정의한 파라미터들을 이용하면 된다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;LoginFailureHandler.java&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@Override&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;void&lt;/span&gt;&amp;nbsp;onAuthenticationFailure(HttpServletRequest&amp;nbsp;request,&amp;nbsp;HttpServletResponse&amp;nbsp;response,&amp;nbsp;AuthenticationException&amp;nbsp;exception)&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;throws&lt;/span&gt;&amp;nbsp;IOException,&amp;nbsp;ServletException&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;username&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;request.getParameter(loginidname);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;password&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;request.getParameter(loginpwdname);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;request.setAttribute(loginidname,&amp;nbsp;username);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;request.setAttribute(loginpwdname,&amp;nbsp;password);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;request.getRequestDispatcher(defaultFailureUrl).forward(request,&amp;nbsp;response);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;- 05, 06행: 아이디와 비밀번호를 getParameter 메서드를 이용해 가져온다.&lt;/p&gt;&lt;p&gt;- 08, 09행: input 태그의 name에 가져온 아이디와 비밀번호 정보를 HttpServletRequest 에서 제공하는 메서드(setAttribute)로 셋팅해준다.&lt;/p&gt;&lt;p&gt;- 11행: HttpServletRequest 의 getRequestDispatcher 메서드를 이용해서 보여줄 화면으로 forward 해준다. forward를 해줘야만 jstl을 이용해서 값들을 가져올 수 있다. 여기서 보여줄 화면은 로그인 실패 시 이동할 페이지(defaultFailureUrl) 이라고 생각하면 된다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;2. 세션을 이용하지 않고 에러 메시지 보여주기&lt;/span&gt;&lt;/p&gt;&lt;p&gt;지금까지의 에러메시지는 웹에서 세션에 접근해서 메시지를 보여주었다. 에러 메세지를 세션에 저장하는 것은 spring security 에서 자동으로 하는 것이다.&amp;nbsp;하지만 이렇게 웹에서 세션을 통해&amp;nbsp;에러 메시지를 가져오는 건 좋지 않다. 그래서&amp;nbsp;request의 setAttribute를 이용해서 에러 메시지를 보여줄 것이다. 헷갈릴 수도 있어서 더 설명하자면, 웹에서 세션을 통해&amp;nbsp;에러메시지를 가져오는 걸 막기 위해서 세션을 통해 가져온&amp;nbsp;에러메시지를 Attribute를 이용해 저장한 다음, 웹에서는 jstl로 보여주는 작업을 하는 것이다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;LoginFailureHandler.java&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@Override&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;void&lt;/span&gt;&amp;nbsp;onAuthenticationFailure(HttpServletRequest&amp;nbsp;request,&amp;nbsp;HttpServletResponse&amp;nbsp;response,&amp;nbsp;AuthenticationException&amp;nbsp;exception)&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;throws&lt;/span&gt;&amp;nbsp;IOException,&amp;nbsp;ServletException&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;username&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;request.getParameter(loginidname);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;password&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;request.getParameter(loginpwdname);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;errormsg&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;exception.getMessage();&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;request.setAttribute(loginidname,&amp;nbsp;username);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;request.setAttribute(loginpwdname,&amp;nbsp;password);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;request.setAttribute(errormsgname,&amp;nbsp;errormsg);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;request.getRequestDispatcher(defaultFailureUrl).forward(request,&amp;nbsp;response);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;- 07행: 세션을 통해 에러메시지를 가져온다.&lt;/p&gt;&lt;p&gt;- 11행: 에러 메시지를 셋팅해준다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;사실 세션을 통해 에러메시지를 가져와서 다른 값에 셋팅해주어 보여주기만 한다면 이렇게 간단하다. 이렇게 해도 별 문제는 없다. 하지만 나는 추가 작업이 더 필요하다.&amp;nbsp;내가 쉬운 방법을 찾지 못한건지 모르겠지만, 이 다음 작업인&amp;nbsp;비밀번호가 틀렸을 때 해주어야할 작업이 남아있는데, 이 작업을 위해서는 아이디가 틀린 경우, 비밀번호가 틀린 경우를 구분해줘야 한다. (사실 이 부분부터는 내가 생각한 방식이여서 정확한 방법이 아닐 수도 있다.)&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;먼저 메세지 프로퍼티 사용하기 위해서&amp;nbsp;Message Source Accessor를 등록해줘야한다. 별로 많은 내용이 있지는 않지만 따로 분리해서 설명을 하려고 한다. 메세지 프로퍼티를 사용할 준비가 됐다면 에러를 분리해보자. 내가 찾은 spring security의 예외 세션들이다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;table class=&quot;txc-table&quot; width=&quot;686&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; style=&quot;border: none; border-collapse: collapse; width: 686px;&quot; 맑은=&quot;&quot; 고딕&quot;,=&quot;&quot; sans-serif;font-size:13px&quot;=&quot;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;width: 311px; height: 24px; border-width: 1px; border-style: solid; border-color: rgb(0, 0, 0) rgb(217, 217, 217) rgb(217, 217, 217) rgb(0, 0, 0); background-color: rgb(0, 0, 0); color: rgb(255, 255, 255);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;Exception&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 374px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(0, 0, 0); border-top: 1px solid rgb(0, 0, 0); background-color: rgb(0, 0, 0); color: rgb(255, 255, 255);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;설명&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;width: 311px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-left: 1px solid rgb(0, 0, 0); background-color: transparent; color: rgb(0, 0, 0);&quot;&gt;&lt;p&gt;&amp;nbsp;BadCredentialException&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 374px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(0, 0, 0); background-color: transparent; color: rgb(0, 0, 0);&quot;&gt;&lt;p&gt;&amp;nbsp;비밀번호가 일치하지 않을 때 던지는 예외&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;width: 311px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-left: 1px solid rgb(0, 0, 0); background-color: transparent; color: rgb(0, 0, 0);&quot;&gt;&lt;p&gt;&amp;nbsp;InternalAuthenticationServiceException&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 374px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(0, 0, 0); background-color: transparent; color: rgb(0, 0, 0);&quot;&gt;&lt;p&gt;&amp;nbsp;존재하지 않는 아이디일 때 던지는 예외&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;width: 311px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-left: 1px solid rgb(0, 0, 0); background-color: transparent; color: rgb(0, 0, 0);&quot;&gt;&lt;p&gt;&amp;nbsp;AuthenticationCredentialNotFoundException&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 374px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(0, 0, 0); background-color: transparent; color: rgb(0, 0, 0);&quot;&gt;&lt;p&gt;&amp;nbsp;인증 요구가 거부됐을 때 던지는 예외&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;width: 311px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-left: 1px solid rgb(0, 0, 0); background-color: transparent; color: rgb(0, 0, 0);&quot;&gt;&lt;p&gt;&amp;nbsp;LockedException&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 374px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(0, 0, 0); background-color: transparent; color: rgb(0, 0, 0);&quot;&gt;&lt;p&gt;&amp;nbsp;인증 거부 - 잠긴 계정&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;width: 311px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-left: 1px solid rgb(0, 0, 0); background-color: transparent; color: rgb(0, 0, 0);&quot;&gt;&lt;p&gt;&amp;nbsp;DisabledException&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 374px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(0, 0, 0); background-color: transparent; color: rgb(0, 0, 0);&quot;&gt;&lt;p&gt;&amp;nbsp;인증 거부 - 계정 비활성화&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;width: 311px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-left: 1px solid rgb(0, 0, 0); background-color: transparent; color: rgb(0, 0, 0);&quot;&gt;&lt;p&gt;&amp;nbsp;AccountExpiredException&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 374px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(0, 0, 0); background-color: transparent; color: rgb(0, 0, 0);&quot;&gt;&lt;p&gt;&amp;nbsp;인증 거부 - 계정 유효기간 만료&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;width: 311px; height: 24px; border-bottom: 1px solid rgb(0, 0, 0); border-right: 1px solid rgb(217, 217, 217); border-left: 1px solid rgb(0, 0, 0); background-color: transparent; color: rgb(0, 0, 0);&quot;&gt;&lt;p&gt;&amp;nbsp;CredentialExpiredException&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 374px; height: 24px; border-bottom: 1px solid rgb(0, 0, 0); border-right: 1px solid rgb(0, 0, 0); background-color: transparent; color: rgb(0, 0, 0);&quot;&gt;&lt;p&gt;&amp;nbsp;인증 거부 - 비밀번호 유효기간 만료&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;여기서 알아둬야 할 것은, 비밀번호와 아이디가 일치하지 않는 예외들의 메세지를 분리해서는 안된다. 물론 분리해서 아이디가 틀렸습니다, 혹은 비밀번호가 틀렸습니다와 같은 메세지를 보여줘도 된다. 하지만 이러면 보안성이 낮아진다. 조금이라도&amp;nbsp;더 보안성을 높이려면 두 개의 예외를 하나의 메세지로 처리하는 것이 좋다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;예외 분리&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;//AuthenticationProvider&amp;nbsp;인터페이스를&amp;nbsp;구현한&amp;nbsp;클래스의&amp;nbsp;Authentication()&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color:#ff3399&quot;&gt;!&lt;/span&gt;user.isEnabled()&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;|&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;!&lt;/span&gt;user.isCredentialsNonExpired())&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;throw&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;new&lt;/span&gt;&amp;nbsp;AuthenticationCredentialsNotFoundException(username);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;//UserDetailsService&amp;nbsp;인터페이스를&amp;nbsp;구현한&amp;nbsp;클래스의&amp;nbsp;loadUserByUsername()&amp;nbsp;메서드&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;if&lt;/span&gt;(user&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;null&lt;/span&gt;)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;throw&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;new&lt;/span&gt;&amp;nbsp;InternalAuthenticationServiceException(username);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;계정 인증 관련 예외들을 BadCredentialException 예외로 던지면 세션에서 알아서 세분류 되어&amp;nbsp;에러 메시지를 보여주었다. 마찬가지로 좀 더 세분화하기 위해 인증과 관련된 예외중 상위 예외인&amp;nbsp;AuthenticationCredentialNotFoundException 예외를 사용했다. 해당 예외로 던지면&amp;nbsp;핸들러에 오는 에러 세션는&amp;nbsp;좀 더 세분화 된 예외로 들어오게 된다. 그렇기에 or 조건을 사용하여&amp;nbsp;인증 관련 예외들은 하나로 묶은 뒤 해당&amp;nbsp;예외를&amp;nbsp;던져주었다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;계정이 존재하지 않을 때 UserNotFoundException 예외를 던지게 되면, BadCredentialException 예외로 받게 된다. 그러면 아이디 예외와 비밀번호 예외가 구분되지 않아서, 찾다가 찾은 예외가 InternalAuthenticationServcieException 예외이다. 해당 예외는 UserDetailsService 인터페이스에서 아무런 값이 리턴되지 않을 때 발생하는 예외이다. 리턴값이 아무것도 없다는 것은 아이디가 존재하지 않다는 뜻이라&amp;nbsp;생각해서&amp;nbsp;해당 예외를 사용하게 되었다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;LoginFailureHandler.java&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;18&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;19&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;20&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;21&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;22&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;23&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;24&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@Override&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;void&lt;/span&gt;&amp;nbsp;onAuthenticationFailure(HttpServletRequest&amp;nbsp;request,&amp;nbsp;HttpServletResponse&amp;nbsp;response,&amp;nbsp;AuthenticationException&amp;nbsp;exception)&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;throws&lt;/span&gt;&amp;nbsp;IOException,&amp;nbsp;ServletException&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;username&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;request.getParameter(loginidname);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;password&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;request.getParameter(loginpwdname);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;errormsg&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;null&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;if&lt;/span&gt;(exception&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;instanceof&lt;/span&gt;&amp;nbsp;BadCredentialsException)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;errormsg&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;MessageUtils.getMessage(&lt;span style=&quot;color:#993333&quot;&gt;&quot;error.BadCredentials&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;else&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;if&lt;/span&gt;(exception&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;instanceof&lt;/span&gt;&amp;nbsp;InternalAuthenticationServiceException)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;errormsg&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;MessageUtils.getMessage(&lt;span style=&quot;color:#993333&quot;&gt;&quot;error.BadCredentials&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;else&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;if&lt;/span&gt;(exception&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;instanceof&lt;/span&gt;&amp;nbsp;DisabledException)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;errormsg&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;MessageUtils.getMessage(&lt;span style=&quot;color:#993333&quot;&gt;&quot;error.Disaled&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;else&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;if&lt;/span&gt;(exception&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;instanceof&lt;/span&gt;&amp;nbsp;CredentialsExpiredException)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;errormsg&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;MessageUtils.getMessage(&lt;span style=&quot;color:#993333&quot;&gt;&quot;error.CredentialsExpired&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;request.setAttribute(loginidname,&amp;nbsp;username);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;request.setAttribute(loginpwdname,&amp;nbsp;password);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;request.setAttribute(errormsgname,&amp;nbsp;errormsg);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;request.getRequestDispatcher(defaultFailureUrl).forward(request,&amp;nbsp;response);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;- 07행: 에러 메시지를 담을 변수를 지정한다.&lt;/p&gt;&lt;p&gt;- 09~17행: AuthenticationException 에서 오는 예외의 타입을 체크해서 알맞은 에러 메시지를 메세지 프로퍼티를 이용해 변수에 담아준다.&amp;nbsp;비밀번호가 틀릴 경우와 아이디가 없을 경우의 예외가 서로 다르지만, 같은 에러 메시지를 뿌려준다.&amp;nbsp;&lt;/p&gt;&lt;p&gt;- 21행: 저장된 에러 메시지를 셋팅해준다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;security_message.properties&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;error.BadCredentials=아이디나&amp;nbsp;비밀번호가&amp;nbsp;맞지&amp;nbsp;않습니다.&amp;nbsp;다시&amp;nbsp;확인해주세요.&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;error.Disaled=계정이&amp;nbsp;비활성화되었습니다.&amp;nbsp;관리자에게&amp;nbsp;문의하세요.&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;error.CredentialsExpired=비밀번호&amp;nbsp;유효기간이&amp;nbsp;만료&amp;nbsp;되었습니다.&amp;nbsp;관리자에게&amp;nbsp;문의하세요.&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;error.Locked=계정이&amp;nbsp;잠겨있습니다.&amp;nbsp;관리자에게&amp;nbsp;문의하세요.&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;error.AccountExpired=계정이&amp;nbsp;만료되었습니다.&amp;nbsp;관리자에게&amp;nbsp;문의하세요.&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;에러에 맞게끔 예외 메세지를 작성해준다. 내가 사용하고 싶은&amp;nbsp;key값들로 바뀌었을 뿐 메세지에는 크게 변화는 없다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;3. 비밀번호를 3번 이상 틀릴 시 계정 잠금 처리&lt;/span&gt;&lt;/p&gt;&lt;p&gt;비밀번호가 일치하지 않는 예외일 때 해당 로직을 작성해주면 된다. 우리가 예외를 분리한 이유이다. 비밀번호 틀린 횟수를 어떻게 가지고 있어야 할까? DB를 이용해서 틀린 횟수를 체크하려고 한다. DB에 실패 카운터 컬럼을 생성해서 비밀번호가 틀릴 경우 실패 카운터 컬럼을 1씩 증가시킨다면 틀린 횟수를 쉽게 알 수 있게 된다.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;txc-textbox&quot; style=&quot;border-style: dashed; border-width: 1px; border-color: rgb(203, 203, 203); background-color: rgb(255, 255, 255); padding: 10px;&quot;&gt;&lt;p&gt;1. 비밀번호 실패 카운터 1 증가&lt;/p&gt;&lt;p&gt;2. 비밀번호 실패 횟수 가져오기&lt;/p&gt;&lt;p&gt;3. 만약 3번 틀렸다면 계정 잠금 처리&lt;/p&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;비밀번호가 틀렸으면 먼저 실패 카운터를 1 증가시킨 후, 실패 횟수를 가져온다. 실패 횟수가 3번이면 계정 잠금 처리를 하고 아니면 그냥 넘어간다. 이렇게 하면 3번째에 틀렸을 경우 계정이 잠금이 되고, 4번째에 비밀번호가 맞든 틀리든 계정이 잠금되었다는 에러 메시지가 나갈 것이다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;LoginFailureHandler.java&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;18&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;19&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;20&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;21&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;22&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;23&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;24&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;25&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;26&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;27&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;28&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;29&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;class&lt;/span&gt;&amp;nbsp;LoginFailureHandler&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;implements&lt;/span&gt;&amp;nbsp;AuthenticationFailureHandler&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@Resource(name&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#993333&quot;&gt;&quot;userSer&quot;&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;private&lt;/span&gt;&amp;nbsp;UserService&amp;nbsp;userSer;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@Override&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;void&lt;/span&gt;&amp;nbsp;onAuthenticationFailure(HttpServletRequest&amp;nbsp;request,&amp;nbsp;HttpServletResponse&amp;nbsp;response,&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AuthenticationException&amp;nbsp;exception)&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;throws&lt;/span&gt;&amp;nbsp;IOException,&amp;nbsp;ServletException&amp;nbsp;{&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;if&lt;/span&gt;(exception&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;instanceof&lt;/span&gt;&amp;nbsp;BadCredentialsException)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;loginFailureCount(username);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;errormsg&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;MessageUtils.getMessage(&lt;span style=&quot;color:#993333&quot;&gt;&quot;error.BadCredentials&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;protected&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;void&lt;/span&gt;&amp;nbsp;loginFailureCount(&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;username)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;userSer.countFailure(username);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;int&lt;/span&gt;&amp;nbsp;cnt&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;userSer.checkFailureCount(username);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;if&lt;/span&gt;(cnt&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#308ce5&quot;&gt;3&lt;/span&gt;)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;userSer.disabledUsername(username);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;- 14행: 비밀번호가 틀렸을 경우 실패 카운터와 관련된 메서드를 실행시킨다.&lt;/p&gt;&lt;p&gt;- 20행: 실패 카운터 메서드이다. 로그인 실패 핸들러 안에 존재한다.&lt;/p&gt;&lt;p&gt;- 21행: 실패 카운터를 증가시킨다.&lt;/p&gt;&lt;p&gt;- 22행: 실패 횟수를 가져온다.&lt;/p&gt;&lt;p&gt;- 23~25행: 실패 횟수가 3회일때 계정을 잠금 처리한다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;Service 영역&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;18&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;19&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;20&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;21&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;22&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;23&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;24&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;25&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;26&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;27&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;28&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;29&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;30&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;31&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;32&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;interface&lt;/span&gt;&amp;nbsp;UserService&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;void&lt;/span&gt;&amp;nbsp;countFailure(&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;username);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;int&lt;/span&gt;&amp;nbsp;checkFailureCount(&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;username);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;void&lt;/span&gt;&amp;nbsp;disabledUsername(&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;username);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;@Service(&lt;span style=&quot;color:#993333&quot;&gt;&quot;userSer&quot;&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;class&lt;/span&gt;&amp;nbsp;UserServiceImpl&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;implements&lt;/span&gt;&amp;nbsp;UserService&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@Resource(name&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#993333&quot;&gt;&quot;userAuthDAO&quot;&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;private&lt;/span&gt;&amp;nbsp;UserAuthDAO&amp;nbsp;userDAO;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@Override&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;void&lt;/span&gt;&amp;nbsp;countFailure(&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;username)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;userDAO.updateFailureCount(username);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@Override&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;int&lt;/span&gt;&amp;nbsp;checkFailureCount(&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;username)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;return&lt;/span&gt;&amp;nbsp;userDAO.checkFailureCount(username);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@Override&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;void&lt;/span&gt;&amp;nbsp;disabledUsername(&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;username)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;userDAO.updateDisabled(username);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;DAO 영역&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;18&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;19&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;@Repository(&lt;span style=&quot;color:#993333&quot;&gt;&quot;userAuthDAO&quot;&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;class&lt;/span&gt;&amp;nbsp;UserAuthDAO&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@Autowired&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;private&lt;/span&gt;&amp;nbsp;SqlSessionTemplate&amp;nbsp;sqlSession;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;CustomUserDetails&amp;nbsp;getUserById(&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;username)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;return&lt;/span&gt;&amp;nbsp;sqlSession.selectOne(&lt;span style=&quot;color:#993333&quot;&gt;&quot;user.selectUserById&quot;&lt;/span&gt;,&amp;nbsp;username);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;void&lt;/span&gt;&amp;nbsp;updateFailureCount(&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;username)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sqlSession.update(&lt;span style=&quot;color:#993333&quot;&gt;&quot;user.updateFailureCount&quot;&lt;/span&gt;,&amp;nbsp;username);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;int&lt;/span&gt;&amp;nbsp;checkFailureCount(&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;username)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;return&lt;/span&gt;&amp;nbsp;sqlSession.selectOne(&lt;span style=&quot;color:#993333&quot;&gt;&quot;user.checkFailureCount&quot;&lt;/span&gt;,&amp;nbsp;username);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;SQL 영역&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;18&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;19&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;20&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;21&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;22&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;23&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;24&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;25&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;26&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;27&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;28&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;29&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;30&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;31&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;32&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;33&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;34&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;35&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;36&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;mapper&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;namespace&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;user&quot;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;select&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;selectUserById&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;resultType&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;tody.common.vo.CustomUserDetails&quot;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;![CDATA[&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;SELECT&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;*&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;FROM&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;user&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;WHERE&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;ID&lt;/span&gt;=&lt;span style=&quot;color:#0a9989&quot;&gt;#{&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;loginId}&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;]]&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;select&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;update&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;updateFailureCount&quot;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;![CDATA[&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;UPDATE&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;user&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;SET&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;FAILURE_CNT&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;FAILURE_CNT&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;+&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;1&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;WHERE&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;ID&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;#{&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;loginId}&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;]]&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;update&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;select&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;checkFailureCount&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;resultType&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;Integer&quot;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;![CDATA[&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;SELECT&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;FAILURE_CNT&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;FROM&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;user&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;WHERE&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;ID&lt;/span&gt;=&lt;span style=&quot;color:#0a9989&quot;&gt;#{&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;loginId}&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;]]&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;select&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;mapper&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;4. jstl 적용&lt;/span&gt;&lt;/p&gt;&lt;p&gt;LoginFailureHandler 클래스에 로그인 정보, 에러 메시지 등을 셋팅하고 로그인 화면으로 forward 해줬다면 이제 jstl을 이용해서 셋팅한 값들을 그대로 보여주면 된다. 주의해야 할 점은 jstl 파라미터 이름을 정확하게 입력해주어야 한다. 그거만 조심하면 문제없이 나올 것이다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;loginPage.jsp&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;form&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;action&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;/login&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;method&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;post&quot;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;input&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;text&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;loginId&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;example&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;${loginId&amp;nbsp;}&quot;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;input&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;password&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;loginPwd&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;placeholder&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;Password&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;${loginPwd&amp;nbsp;}&quot;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;c:if&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;test&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;${not&amp;nbsp;empty&amp;nbsp;ERRORMSG}&quot;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;font&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;color&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;red&quot;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;p&lt;/span&gt;&amp;gt;Your&amp;nbsp;login&amp;nbsp;attempt&amp;nbsp;was&amp;nbsp;not&amp;nbsp;successful&amp;nbsp;due&amp;nbsp;to&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;br/&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;${ERRORMSG&amp;nbsp;}&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;p&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;font&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;c:if&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;form&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;- 03, 05행: 사용자가 입력한 로그인 정보를 셋팅하여 jstl을 이용해서 보여준다.&lt;/p&gt;&lt;p&gt;- 07, 10행: 이젠 세션에서 에러메시지를 가져오는 것이 아닌 jstl을 이용해서 에러 메세지를 보여준다.&lt;/p&gt;&lt;p&gt;그리고 에러메시지를 더이상 세션에서 가져오는 것이 아니기 때문에 &amp;lt;c:remove&amp;gt; 태그를 이용해 세션을 지우던 로직은 삭제하였다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;로그인 성공 후 부가 작업부터 하지 않고 실패 핸들러 작업부터 한 이유는, 비밀번호를 2번 틀리고 로그인에 성공했을 때 로그인 횟수가 남아있다면 다음번에 로그인을 할 때 한번이라도 틀리면 계정이 잠금된다. 그걸 방지하기 위해 로그인 성공시 로그인 실패 카운터를 초기화 해주는 작업을 해야 하는데 로그인 성공 핸들러부터 한다면 뭔가 거꾸로 가는 기분이라서 실패 핸들러부터 작성했다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/todyDev/Spring-Security/tree/v2.1.32&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;GitHub&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 8pt; color: rgb(189, 189, 189);&quot;&gt;참고 :&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://zgundam.tistory.com/category/프로그래밍/Spring Security&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;span style=&quot;font-size: 8pt; color: rgb(189, 189, 189);&quot;&gt;사랑이 고픈 프로그래머..&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-size: 8pt; color: rgb(189, 189, 189);&quot;&gt;&lt;/span&gt;&lt;/p&gt;</description>
      <category>공부/Spring Security</category>
      <category>AuthenticationFailureHandler</category>
      <category>Spring security 4</category>
      <category>스프링</category>
      <category>스프링 시큐리티 4</category>
      <author>#에게</author>
      <guid isPermaLink="true">https://to-dy.tistory.com/92</guid>
      <comments>https://to-dy.tistory.com/92#entry92comment</comments>
      <pubDate>Thu, 3 Jan 2019 15:52:55 +0900</pubDate>
    </item>
    <item>
      <title>처음으로 Fork 당했다(?)!</title>
      <link>https://to-dy.tistory.com/93</link>
      <description>&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;연말 잘 보내고&amp;nbsp;행복한 새해를 맞이하고 왔더니, 기분 좋은 알람이 딸랑 딸랑~&amp;nbsp;&lt;img src=&quot;//i1.daumcdn.net/deco/contents/emoticon/things_34.gif?v=2&quot; border=&quot;0&quot; class=&quot;txc-emo&quot;&gt;&lt;span style=&quot;font-size: 9pt;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 550px; width: 550px; height: 138px;; height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/991E15495C2C64081B&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F991E15495C2C64081B&quot; width=&quot;550&quot; height=&quot;138&quot; filename=&quot;1.jpg&quot; filemime=&quot;image/jpeg&quot; style=&quot;width: 550px; height: 138px;&quot; original=&quot;yes&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 550px; width: 550px; height: 91px;; height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/99C1DA3A5C2C66741E&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F99C1DA3A5C2C66741E&quot; width=&quot;550&quot; height=&quot;91&quot; filename=&quot;3.PNG&quot; filemime=&quot;image/jpeg&quot; style=&quot;width: 550px; height: 91px;&quot; original=&quot;yes&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;호에에엑!!&amp;nbsp;누가 내 프로젝트를 Fork를 한 것이다! 우와아아앙ㅇ!!&amp;nbsp;신기해 신기해!! 1 Fork 신기해!!!&lt;/p&gt;&lt;p&gt;아직 완성되지 않은 프로젝트인지라 조-금 부끄럽지만.. 이슈나 풀리퀘스트 언제든지 받습니다! 얏호!&lt;/p&gt;&lt;p&gt;사실 블로그에 댓글 달리는 것도 정말 신기하다. 달릴 때마다 신기하다!&lt;/p&gt;&lt;p&gt;감사하다는 댓글들, 질문들 전부 감사할 뿐이다. 덕분에 글 쓸 때 더 긴장된다. 후하후하-&lt;/p&gt;&lt;p&gt;틀린게 있으면 어쩌지ㅠㅠ (쭈굴) 그래서 더 찾아보게 되고&amp;nbsp;더 공부하게 된다! 댓글 좋아~♥&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;유난히 새로운 것을 많이 접하게 된 2018년도여서 그런지,&amp;nbsp;정신없이 바쁘기도 했고 그만큼 지치기도 했다.&lt;/p&gt;&lt;p&gt;이 많은 공부들을 내가 끝까지 혼자 다 할 수 있을까, 라는 생각도 많이 들었고,&lt;/p&gt;&lt;p&gt;괜히 일 크게 벌려서 사서 고생하는 거 아닐까, 라는 생각도 많이 들었다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;근데 이렇게 누군가가 나의&amp;nbsp;글에 관심을 갖는것, 그리고 누군가에게&amp;nbsp;도움이 된다는 것이 내 열정에 기름을 들이 붓는다(ㅎㅁㅎ)!&lt;/p&gt;&lt;p&gt;사서 고생이라고 해도 나는 재밌는 걸 어떡하냐! 내가 재밌으면 됐지! 내가 즐거웠으면 된거야!&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;그럼 2019년도도 수고하고 화이팅!&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>일지</category>
      <author>#에게</author>
      <guid isPermaLink="true">https://to-dy.tistory.com/93</guid>
      <comments>https://to-dy.tistory.com/93#entry93comment</comments>
      <pubDate>Wed, 2 Jan 2019 16:43:13 +0900</pubDate>
    </item>
    <item>
      <title>Spring Security - 인증 절차 인터페이스 구현 (2) AuthenticationProvider</title>
      <link>https://to-dy.tistory.com/87</link>
      <description>&lt;p&gt;AuthenticationProvider 인터페이스는 화면에서 입력한 로그인 정보와 DB에서 가져온 사용자의 정보를 비교해주는 인터페이스이다.&amp;nbsp;해당 인터페이스에 오버라이드되는&amp;nbsp;authenticate() 메서드는&amp;nbsp;화면에서 사용자가 입력한 로그인 정보를 담고 있는 Authentication 객체를 가지고 있다. 그리고 DB에서 사용자의 정보를 가져오는 건 UserDetailsService 인터페이스에서 loadUserByUsername() 메서드로&amp;nbsp;구현했다. 따라서 authenticate() 메서드에서 loadUserByUsernmae() 메서드를 이용해&amp;nbsp;DB에서 사용자 정보를 가져와서&amp;nbsp;Authentication 객체에서 화면에서 가져온 로그인 정보와&amp;nbsp;비교하면 된다. AuthenticationProvider 인터페이스는 인증에 성공하면 인증된 Authentication 객체를 생성하여 리턴하기 때문에 비밀번호, 계정 활성화, 잠금 모든 부분에서 확인이 되었다면 리턴해주도록 하자.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;1. &lt;/span&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;AuthenticationProvider&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;18&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;19&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;20&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;21&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;22&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;23&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;24&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;25&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;26&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;27&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;28&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;29&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;30&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;31&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;32&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;33&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;34&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;35&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;class&lt;/span&gt;&amp;nbsp;CustomAuthenticationProvider&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;implements&lt;/span&gt;&amp;nbsp;AuthenticationProvider&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@Autowired&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;private&lt;/span&gt;&amp;nbsp;UserDetailsService&amp;nbsp;userDeSer;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@SuppressWarnings(&lt;span style=&quot;color:#993333&quot;&gt;&quot;unchecked&quot;&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@Override&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;Authentication&amp;nbsp;authenticate(Authentication&amp;nbsp;authentication)&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;throws&lt;/span&gt;&amp;nbsp;AuthenticationException&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;username&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;)&amp;nbsp;authentication.getPrincipal();&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;password&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;)&amp;nbsp;authentication.getCredentials();&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CustomUserDetails&amp;nbsp;user&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;(CustomUserDetails)&amp;nbsp;userDeSer.loadUserByUsername(username);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color:#ff3399&quot;&gt;!&lt;/span&gt;matchPassword(password,&amp;nbsp;user.getPassword()))&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;throw&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;new&lt;/span&gt;&amp;nbsp;BadCredentialsException(username);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color:#ff3399&quot;&gt;!&lt;/span&gt;user.isEnabled())&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;throw&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;new&lt;/span&gt;&amp;nbsp;BadCredentialsException(username);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;return&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;new&lt;/span&gt;&amp;nbsp;UsernamePasswordAuthenticationToken(username,&amp;nbsp;password,&amp;nbsp;user.getAuthorities());&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@Override&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;boolean&lt;/span&gt;&amp;nbsp;supports(Class&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;?&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;authentication)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;return&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#308ce5&quot;&gt;true&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;private&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;boolean&lt;/span&gt;&amp;nbsp;matchPassword(&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;loginPwd,&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;&amp;nbsp;password)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;return&lt;/span&gt;&amp;nbsp;loginPwd.&lt;span style=&quot;color:#0099cc&quot;&gt;equals&lt;/span&gt;(password);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;10행: 화면에서 입력한 아이디를 username에 담는다.&lt;/p&gt;&lt;p&gt;11행: 화면에서 입력한 비밀번호를 password에 담는다.&lt;/p&gt;&lt;p&gt;13행: 화면에서 입력한&amp;nbsp;아이디(username)로 DB에 있는 사용자의 정보를 UserDetails 형으로 가져와 user에 담는다.&lt;/p&gt;&lt;p&gt;15행:&amp;nbsp;화면에서 입력한 비밀번호와 DB에서 가져온 비밀번호를 비교하는 로직이다. 비밀번호가 맞지 않다면 예외를 던진다.&lt;/p&gt;&lt;p&gt;19행: 계정 활성화 여부를 확인하는 로직이다. AuthenticationProvider 인터페이스를 구현하게 되면 계정 잠금 여부나 활성화 여부등은 여기에서 확인해야 한다.&lt;/p&gt;&lt;p&gt;23행: 계정이 인증됐다면 UsernamePasswordAuthenticationToken 객체에 화면에서 입력한 정보와 DB에서 가져온 권한을&amp;nbsp;담아서 리턴한다.&lt;/p&gt;&lt;p&gt;27행: AuthenticationProvider 인터페이스가 지정된 Authentication 객체를 지원하는 경우에 true를 리턴한다.&lt;/p&gt;&lt;p&gt;31행: 비밀번호를 비교하는 메서드이다. 맞으면 true를 리턴한다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: rgb(140, 140, 140);&quot;&gt;&lt;span style=&quot;color: rgb(166, 166, 166);&quot;&gt;계정 관련 체크 여부(19행)에 관해서 언급할 게 있다.&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 166, 166);&quot;&gt;&amp;nbsp;이 부분은 온전히 내 생각일 뿐이기 떄문에 정확한 건 아니다.&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 166, 166);&quot;&gt;&amp;nbsp;좀 더 찾아봐야 할 부분이다.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 166, 166);&quot;&gt;&amp;nbsp;그리고 난&amp;nbsp;왜 UserDetailsService 인터페이스를 구현할 때 이걸 궁금해하지 않았는 지 의문이다(ㅋㅋ) UserDetailsService 인터페이스를 구현할 때 비활성화된 계정을 체크하는 로직이 없었다. 근데 비활성화된 계정은 에러로 예외가 던져졌다(!!!) 왜 이걸 궁금해하지 않고 그냥 넘어갔을 까 ㅋㅋㅋ 정확히는 모르지만 DB에서 가져온 사용자의 정보를 UserDetails 인터페이스에 담으면서 계정관련 체크 여부를 알아서 확인하고 예외를 던지는 것 같다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: rgb(166, 166, 166);&quot;&gt;근데 AuthenticationProvider 인터페이스를 구현하게 됐을 때 문제가 발생했었다. 비활성화된 계정이 예외를 던지지않고 그냥 로그인에 성공해버리는 문제가 생겼었다ㅠㅠ.. AuthenticationProvider 인터페이스를 구현하니까 UserDetailsService 인터페이스에서 계정 관련 체크를 하지 않았다ㅠㅠ AuthenticationProvider 인터페이스를 구현하게 되면서 UserDetailsService 인터페이스는 DB에서 사용자의 정보를 가져오는 역할만 하게 되버린 것 같다.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 166, 166);&quot;&gt;그래서&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 166, 166);&quot;&gt;&amp;nbsp;UserDetailsService 인터페이스에서 계정 활성화여부를 체크해보려고 했는데&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 166, 166);&quot;&gt;&amp;nbsp;적절한 예외가 없어서 에러 메시지가 제대로 나오지 않았다. 근데 AuthenticationProvider 인터페이스에는 적절한 에러 메시지를 던지는 예외가 있는 걸 확인했다! 유레카!&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 166, 166);&quot;&gt;&amp;nbsp;그래서 내 생각에&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 166, 166);&quot;&gt;는&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 166, 166);&quot;&gt;&amp;nbsp;AuthenticationProvider 인터페이스와 UserDetailsService 인터페이스를 구현하게 되면 UserDetailsServcie 인터페이스는 DB에서 사용자의 정보를 가져오는 역할을 하고, AuthenticationProvider 인터페이스에서 비밀번호 체크 및 계정과 관련된 각종 체크여부를 확인해야 되는 것 같다.&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 166, 166);&quot;&gt;&amp;nbsp;대부분 &lt;/span&gt;&lt;span style=&quot;color: rgb(166, 166, 166);&quot;&gt;계정 체크 부분을&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 166, 166);&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 166, 166);&quot;&gt;true로 하고 만들어서 그런지 자료가 없었다ㅠㅠ 그냥 내 생각일 뿐이니.. 얼른 정확한 자료를 찾아봐야 겠다ㅠㅠ&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;2. Security 설정&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;context-security&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;security:authentication-manager&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;security:authentication-provider&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;ref&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;userAuthProvider&quot;&lt;/span&gt;&lt;span style=&quot;color:#0a9989&quot;&gt;/&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;security:authentication-provider&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;user-service-ref&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;userService&quot;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;security:authentication-provider&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;security:authentication-manager&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;bean&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;userService&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;tody.common.service.CustomUserDetailsService&quot;&lt;/span&gt;&lt;span style=&quot;color:#0a9989&quot;&gt;/&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;bean&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;userAuthProvider&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;tody.common.service.CustomAuthenticationProvider&quot;&lt;/span&gt;&lt;span style=&quot;color:#0a9989&quot;&gt;/&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;02행과 08행이 추가되었다. AuthenticationProvider 인터페이스를 구현한 CustomAuthenticationProvider 클래스를 등록하는 부분이다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: rgb(166, 166, 166);&quot;&gt;&amp;lt;authentication-provider&amp;gt; 태그는 여러 요소를 사용할 수 있는데, 여러 요소를 사용할 경우 순서대로 진행된다. &lt;/span&gt;&lt;span style=&quot;color: rgb(166, 166, 166);&quot;&gt;사실 어떤걸 먼저 선언&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 166, 166);&quot;&gt;하든 로그인 결과에는 영향을 주지는 않는다.&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 166, 166);&quot;&gt;&amp;nbsp;하지만 &lt;/span&gt;&lt;span style=&quot;color: rgb(166, 166, 166);&quot;&gt;UserDetailsService 인터페이스가 먼저 선언되서 사용될 경우 &lt;/span&gt;&lt;span style=&quot;color: rgb(166, 166, 166);&quot;&gt;에러 메시지가 제대로 나오지 않는다. 정확히는 에러 메시지 프로퍼티를 사용할 수 없다. 이 부분에 대해선 정확히 잘 몰라서 설명하지 못하지만(ㅠㅠ)&lt;/span&gt;&lt;span style=&quot;color: rgb(166, 166, 166);&quot;&gt;&amp;nbsp;UserDetailsService 인터페이스가 먼저 실행되면 AuthenticationProvider 인터페이스를 구현할 이유가 없지 않을까? 싶다..ㅋㅋㅋㅋ&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;3. 실행&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 600px; width: 600px; height: 490px;; height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/995E1B375C04E04C10&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F995E1B375C04E04C10&quot; width=&quot;600&quot; height=&quot;490&quot; filename=&quot;26.PNG&quot; filemime=&quot;image/jpeg&quot; style=&quot;width: 600px; height: 490px;&quot; original=&quot;yes&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;비밀번호가 틀릴 경우, 비밀번호가 맞지 않다는 에러 문구가 뜨고 로그인에 실패할 것이다. 물론 비밀번호를 맞게 한다면 당연히 로그인에 성공해야 한다. 이렇게&amp;nbsp;비밀번호 비교 확인이 완벽하게 이루어진다면 AuthenticationProvider 인터페이스도 완벽하게 구현된 것이다! 휴! 뭔가 어려워보였지만 인터페이스에 맞는 기능들을 생각하고 구현한다면 그리 어렵지만은 않다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/todyDev/Spring-Security/tree/v2.1.10&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;GitHub&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: rgb(189, 189, 189);&quot;&gt;&lt;strike&gt;&lt;i&gt;그리고 지금까지 개인적인&amp;nbsp;생각으로는 AuthenticationProvider 인터페이스까진 구현하지 않아도 충분히 사용할 수 있을 거 같다 ㅋㅋ&lt;/i&gt;&lt;/strike&gt;&lt;/span&gt;&lt;/p&gt;</description>
      <category>공부/Spring Security</category>
      <category>AuthenticationProvider</category>
      <category>Spring Framework</category>
      <category>Spring security 4</category>
      <category>스프링</category>
      <category>스프링 시큐리티 4</category>
      <author>#에게</author>
      <guid isPermaLink="true">https://to-dy.tistory.com/87</guid>
      <comments>https://to-dy.tistory.com/87#entry87comment</comments>
      <pubDate>Mon, 3 Dec 2018 16:56:39 +0900</pubDate>
    </item>
    <item>
      <title>Spring 개발 - 게시판 만들기 #페이징 처리 (1)</title>
      <link>https://to-dy.tistory.com/90</link>
      <description>&lt;p&gt;이전에&amp;nbsp;만든 CRUD 게시판은 100개의 게시글이 있다면 한번에 100개의 게시글이 모두 보여진다. 정말 비효율적인 게시판이다..(ㅎ) 그래서 게시판 목록 페이징 처리를 하려고 한다. 그러면 좀 더 게시판 스럽지 않을까 싶다!&amp;nbsp;나는 만들어 놓은 CURD 게시판을 수정해서 작업을 하는 것이기 때문에 본인의 게시판에 맞게 적절히 섞어(?)주면 된다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;1. 페이징 규칙&lt;/span&gt;&lt;/p&gt;&lt;p&gt;먼저 페이징이 어떤식으로 처리되는 지 이해해보자. 페이지당 게시글을 10개씩 보여주고 페이징 버튼은 최대 10개까지만 보인다고 하자.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul style=&quot;list-style-type: disc;&quot;&gt;&lt;li style=&quot;line-height: 0.5;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;총 게시글 수 77개&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class=&quot;txc-textbox&quot; style=&quot;border-style: solid; border-width: 1px; border-color: rgb(234, 234, 234); background-color: rgb(234, 234, 234); padding: 10px;&quot;&gt;&lt;div&gt;[1] [2] [3] [4] [5] [6] [7] [8]&lt;/div&gt;&lt;/div&gt;&lt;div&gt;총 게시글 수가 77이면 페이지 번호의 끝 번호가 8이여야 한다.&lt;/div&gt;&lt;div&gt;페이지의 끝 번호를 알기 위해서는 총 게시글의 수가 필요하다.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul style=&quot;list-style-type: disc;&quot;&gt;&lt;li style=&quot;line-height: 0.5;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;총 게시글 수 135개&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class=&quot;txc-textbox&quot; style=&quot;border-style: solid; border-width: 1px; border-color: rgb(234, 234, 234); background-color: rgb(234, 234, 234); padding: 10px;&quot;&gt;&lt;div&gt;[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [다음]&lt;/div&gt;&lt;div&gt;[이전] [11] [12] [13]&lt;/div&gt;&lt;/div&gt;&lt;div&gt;화면에 보여줄 페이지 버튼의 수가 10개 이상이라면 다음 버튼을 이용해 다음 페이지를 이용할 수 있어야 한다.&lt;/div&gt;&lt;div&gt;시작 페이지의 번호가 1이 아니라면 이전 버튼을 이용해 이전 페이지를 이용할 수 있어야 한다.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul style=&quot;list-style-type: disc;&quot;&gt;&lt;li style=&quot;line-height: 0.5;&quot;&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;총 게시글 수 215개&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class=&quot;txc-textbox&quot; style=&quot;border-style: solid; border-width: 1px; border-color: rgb(234, 234, 234); background-color: rgb(234, 234, 234); padding: 10px;&quot;&gt;&lt;p&gt;[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [다음]&lt;/p&gt;&lt;p&gt;[이전] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [다음]&lt;/p&gt;&lt;p&gt;[21] [22]&lt;/p&gt;&lt;/div&gt;&lt;p&gt;현재 페이지의 번호가 1~10 사이라면 시작 번호는 1이여야 한다.&lt;/p&gt;&lt;p&gt;현재 페이지의 번호가 11~20 사이라면 시작 번호는 11이여야 한다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;2. 페이징 원칙&lt;/span&gt;&lt;/p&gt;&lt;p&gt;페이징 처리를 함에 있어서 원칙들이 있다.&amp;nbsp;&lt;/p&gt;&lt;ul style=&quot;list-style-type: disc;&quot;&gt;&lt;li&gt;페이징 처리는 반드시 GET 방식만을 이용해야 한다.&lt;/li&gt;&lt;li&gt;게시글 목록 페이지의 하단에 페이지들의 번호를 보여주고 원하는 번호를 선택하면 해당 페이지로 이동해서 목록을 보여줘야 한다.&lt;/li&gt;&lt;li&gt;페이징은 반드시 필요한 페이지 번호만 출력해야 한다. 만약 페이지당 10개의 게시글을 출력하는데 전체 게시글의 수가 42개라면 페이지의 번호는 5페이지까지여야 한다.&lt;/li&gt;&lt;li&gt;이전과 다음 버튼이 존재해야 한다. 게시글이 1000개인데&amp;nbsp;1페이지당 10개의 게시글을 볼 수 있게 했다면 페이징 버튼은 100개가 필요하다. 그런데&amp;nbsp;이전과 다음 버튼이 존재하지 않는다면 100개의 버튼을 한번에 보여줘야 한다. 그렇기때문에 하단 페이지에 보여줄 버튼의 갯수를 정하고 더 많은 데이터가 있다면 이전과 다음 버튼으로 표시해줘야 한다.&lt;/li&gt;&lt;li&gt;게시글을 조회하거나 수정, 삭제를 하고 난 뒤, 다시 원래의 목록 페이지로 이동해야 한다. 예를 들면 게시판에 5페이지에 있는 어떠한 게시물을 조회하거나 수정, 삭제를 했다고 한다면, '목록으로'버튼을 이용해 목록으로 돌아갈 땐 5페이지로 이동해야 한다.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;3. SQL : LIMIT&lt;/span&gt;&lt;/p&gt;&lt;p&gt;페이징 처리를 확인하기 위해서 DB에 100개의 데이터를 넣어뒀다. 그럼 게시판 목록을 조회하는 쿼리를 실행하게 되면 어떻게 될까?&lt;/p&gt;&lt;p style=&quot;line-height: 0.5;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;mysql&lt;span style=&quot;color:#0099cc&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;SELECT&lt;/span&gt;&amp;nbsp;...&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;FROM&lt;/span&gt;&amp;nbsp;board&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;WHERE&lt;/span&gt;&amp;nbsp;DEL_CHK&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#7DA123&quot;&gt;'N'&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;ORDER&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;BY&lt;/span&gt;&amp;nbsp;IDX&amp;nbsp;DESC;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#999999&quot;&gt;-----+--------------+---------+------------+-------------+&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;IDX&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;TITLE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;HIT_CNT&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;CREA_DATE&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;CREA_ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#999999&quot;&gt;-----+--------------+---------+------------+-------------+&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;100&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀100&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018.&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11.&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트100&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;99&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀99A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018.&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11.&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트99&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;98&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀98&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018.&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11.&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트98&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.&amp;nbsp;.&amp;nbsp;.&amp;nbsp;.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;4&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018.&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11.&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;3&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018.&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11.&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018.&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11.&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;1&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018.&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11.&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#999999&quot;&gt;-----+--------------+---------+------------+-------------+&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;100&lt;/span&gt;&amp;nbsp;rows&amp;nbsp;in&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;set&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color:#004fc8&quot;&gt;0.&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;01&lt;/span&gt;&amp;nbsp;sec)&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p style=&quot;line-height: 0.5;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;100개의 게시글이 한번에 나올 것이다. 한 페이지(화면)에 100개 혹은 1000개의 게시글을 한번에 보여주기엔 벅차다. 그렇기에 게시글 목록에는 페이징 처리가 반드시 필요하다. DB에 따라 페이징 처리를 할 수 있는 쿼리가 존재한다고 한다. 그렇기에 각자 사용하는 DB를 확인해서 쿼리를 사용하면 된다. 나는 MySQL을 사용하기 때문에 LIMIT을 이용해서 페이징 처리를 할 것이다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;SELECT&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;*&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;FROM&lt;/span&gt;&amp;nbsp;테이블명&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;ORDER&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;BY&lt;/span&gt;&amp;nbsp;게시글&amp;nbsp;번호&amp;nbsp;DESC&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;LIMIT&lt;/span&gt;&amp;nbsp;시작 행,&amp;nbsp;출력할 갯수&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p style=&quot;line-height: 0.5;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;LIMIT을 위와 같이 사용하게 되면 특정 페이지의 게시글을 보여줄 수 있다. 게시글 번호로 내림차순 정렬한 데이터를 출력할 행부터 출력할 갯수까지 조회해주는 쿼리이다. 데이터의 행은 0부터 시작한다. 따라서 LIMIT 0, 10 이라고 설정하면 0행부터 10개까지의 게시글이 조회될 것이다. 그러면 페이징 처리를 하기 위해선 어떻게 조회를 해야 할까?&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;1페이지 -&amp;gt; 00행 ~ 09행 (10개) : LIMIT 0, 10&lt;/p&gt;&lt;p&gt;2페이지 -&amp;gt; 10행 ~ 19행 (10개) : LIMIT 10, 10&lt;/p&gt;&lt;p&gt;3페이지 -&amp;gt; 20행 ~ 29행 (10개) : LIMIT 20, 10&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;button type=&quot;button&quot; class=&quot;btn_more&quot; id=&quot;more90_0&quot; data-id=&quot;90_0&quot;&gt;적용 쿼리 보기&lt;/button&gt;&lt;div class=&quot;moreless_content&quot; id=&quot;content90_0&quot; style=&quot;display: none;&quot;&gt;&lt;button type=&quot;button&quot; class=&quot;btn_less&quot; id=&quot;less90_0&quot; data-id=&quot;90_0&quot;&gt;&lt;span class=&quot;txt_fold&quot;&gt;접기&lt;/span&gt;&lt;/button&gt;
  &lt;p class=&quot;txt_view&quot;&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;18&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;19&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;20&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;21&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;22&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;23&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;24&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;25&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;26&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;27&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;28&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;29&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;30&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;31&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;32&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;33&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;34&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;35&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;36&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;37&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;38&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;39&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;40&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;41&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;42&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;43&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;44&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;45&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;46&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;47&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;48&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;49&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;50&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;51&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;52&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;53&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;54&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;55&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;56&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;57&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;58&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;59&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;mysql&lt;span style=&quot;color:#0099cc&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;select&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;*&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;from&lt;/span&gt;&amp;nbsp;board&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;where&lt;/span&gt;&amp;nbsp;DEL_CHK&lt;span style=&quot;color:#0099cc&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7DA123&quot;&gt;'N'&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;ORDER&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;BY&lt;/span&gt;&amp;nbsp;IDX&amp;nbsp;desc&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;LIMIT&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;10&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#999999&quot;&gt;-----+--------------+-------------+---------+---------+-------------+---------------------+&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;IDX&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;TITLE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;CONTENTS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;HIT_CNT&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;DEL_CHK&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;CREA_ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;CREA_DATE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#999999&quot;&gt;-----+--------------+-------------+---------+---------+-------------+---------------------+&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;100&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀100&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;내용100&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;N&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트100&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;14&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;37&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;00&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;99&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀99 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;내용99&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;N&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트99&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;14&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;37&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;00&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;98&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀98&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;내용98&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;N&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트98&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;14&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;37&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;00&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;97&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀97&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;내용97&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;N&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트97&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;14&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;37&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;00&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;96&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀96&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;내용96  &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;N&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트96&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;14&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;37&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;00&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;95&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀95&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;내용95&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;N&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트95&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;14&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;37&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;00&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;94&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀94&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;내용94&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;N&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트94&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;14&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;37&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;00&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;93&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀93&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;내용93&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;N&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트93&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;14&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;37&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;00&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;92&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀92 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;내용92&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;N&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트92&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;14&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;37&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;00&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;91&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀91&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;내용91&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;N&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트91&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;14&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;37&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;00&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#999999&quot;&gt;-----+--------------+-------------+---------+---------+--------------+--------------------+&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;10&lt;/span&gt;&amp;nbsp;rows&amp;nbsp;in&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;set&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color:#004fc8&quot;&gt;0.&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;00&lt;/span&gt;&amp;nbsp;sec)&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;mysql&lt;span style=&quot;color:#0099cc&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;select&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;*&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;from&lt;/span&gt;&amp;nbsp;board&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;where&lt;/span&gt;&amp;nbsp;DEL_CHK&lt;span style=&quot;color:#0099cc&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7DA123&quot;&gt;'N'&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;ORDER&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;BY&lt;/span&gt;&amp;nbsp;IDX&amp;nbsp;desc&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;LIMIT&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;10&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;10&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#999999&quot;&gt;-----+-------------+-------------+---------+---------+------------+---------------------+&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;IDX&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;TITLE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;CONTENTS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;HIT_CNT&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;DEL_CHK&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;CREA_ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;CREA_DATE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#999999&quot;&gt;-----+-------------+-------------+---------+---------+------------+---------------------+&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;90&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀90&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;내용90&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;N&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트90&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;14&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;37&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;00&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;89&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀89&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;내용89&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;N&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트89&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;14&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;37&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;00&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;88&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀88&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;내용88&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;N&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트88&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;14&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;37&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;00&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;87&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀87&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;내용87&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;N&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트87&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;14&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;37&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;00&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;86&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀86&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;내용86&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;N&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트86&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;14&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;37&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;00&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;85&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀85&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;내용85&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;N&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트85&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;14&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;37&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;00&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;84&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀84&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;내용84&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;N&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트84&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;14&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;37&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;00&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;83&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀83&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;내용83  &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;N&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트83&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;14&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;37&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;00&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;82&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀82&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;내용82&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;N&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트82&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;14&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;37&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;00&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;81&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀81&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;내용81&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;N&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트81&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;14&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;37&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;00&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#999999&quot;&gt;-----+-------------+-------------+---------+---------+-------------+--------------------+&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;10&lt;/span&gt;&amp;nbsp;rows&amp;nbsp;in&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;set&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color:#004fc8&quot;&gt;0.&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;00&lt;/span&gt;&amp;nbsp;sec)&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;mysql&lt;span style=&quot;color:#0099cc&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;select&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;*&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;from&lt;/span&gt;&amp;nbsp;board&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;where&lt;/span&gt;&amp;nbsp;DEL_CHK&lt;span style=&quot;color:#0099cc&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7DA123&quot;&gt;'N'&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;ORDER&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;BY&lt;/span&gt;&amp;nbsp;IDX&amp;nbsp;desc&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;LIMIT&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;20&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;10&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#999999&quot;&gt;-----+-------------+----------+---------+---------+-------------+--------------------+&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;IDX&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;TITLE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;CONTENTS&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;HIT_CNT&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;DEL_CHK&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;CREA_ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;CREA_DATE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#999999&quot;&gt;-----+-------------+----------+---------+---------+-------------+--------------------+&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;80&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀80&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;내용80&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;N&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트80&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;14&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;37&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;00&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;79&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀79&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;내용79&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;N&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트79&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;14&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;37&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;00&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;78&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀78&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;내용78&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;N&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트78&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;14&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;37&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;00&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;77&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀77&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;내용77&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;N&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트77&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;14&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;37&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;00&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;76&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀76&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;내용76&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;N&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트76&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;14&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;37&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;00&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;75&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀75&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;내용75&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;N&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트75&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;14&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;37&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;00&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;74&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀74&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;내용74&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;N&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트74&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;14&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;37&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;00&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;73&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀73&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;내용73&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;N&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트73&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;14&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;37&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;00&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;72&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀72&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;내용72&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;N&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트72&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;14&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;37&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;00&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;71&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;타이틀71&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;내용71&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;0&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;N&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;테스트71&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;2018&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;26&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#004fc8&quot;&gt;14&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;37&lt;/span&gt;:&lt;span style=&quot;color:#004fc8&quot;&gt;00&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#999999&quot;&gt;-----+-------------+----------+---------+---------+-------------+--------------------+&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;10&lt;/span&gt;&amp;nbsp;rows&amp;nbsp;in&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;set&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color:#004fc8&quot;&gt;0.&lt;/span&gt;&lt;span style=&quot;color:#004fc8&quot;&gt;00&lt;/span&gt;&amp;nbsp;sec)&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/p&gt;
&lt;button type=&quot;button&quot; class=&quot;btn_less&quot; id=&quot;less90_0&quot; data-id=&quot;90_0&quot;&gt;&lt;span class=&quot;txt_fold&quot;&gt;접기&lt;/span&gt;&lt;/button&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;이런식으로 페이징 처리가 이루어져야 한다. 그래서 특정 페이지의 첫번째 게시글의 행번호와 출력할 갯수만 전달 받는다면 특정 페이지의 게시글들을 조호할 수 있을 것이다. 나는 전달받을 파라미터들을 각각 pageStart와 perPageNum으로 정했다. 그러면 아래와 같은 쿼리로 페이징 처리를 하면 된다.&lt;/p&gt;&lt;p style=&quot;line-height: 0.5;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;SELECT&lt;/span&gt;&amp;nbsp;...&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;FROM&lt;/span&gt;&amp;nbsp;board&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;WHERE&lt;/span&gt;&amp;nbsp;DEL_CHK&lt;span style=&quot;color:#0099cc&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7DA123&quot;&gt;'N'&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;ORDER&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;BY&lt;/span&gt;&amp;nbsp;IDX&amp;nbsp;DESC&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;LIMIT&lt;/span&gt;&amp;nbsp;#{pageStart},&amp;nbsp;#{&lt;span style=&quot;color: rgb(0, 0, 0); font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;perPageNum&lt;/span&gt;}&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;ul style=&quot;list-style-type: disc;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;pageStart&lt;/span&gt; : 특정 페이지의 첫번째 게시글의 행이다.&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;perPageNum&lt;/span&gt; : 한 페이지당 보여줄 게시글의 개수이다.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;특정 페이지를 조회하기 위해 두 개의 파라미터를 담는 클래스를 만들 것이다. 이렇게 클래스를 만드는 이유는 뭘까?&amp;nbsp;게시판에도&amp;nbsp;여러 종류의 게시판이 존재한다. 그러면 게시판 마다 페이징 조회 로직을 생성해야 한다. 하지만&amp;nbsp;페이징 관련된 기능들을 별도의 클래스로 분리해놓는다면 조금 더 효율적인 작업을 할 수 있다.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;4. 특정 페이지&amp;nbsp;조회를 위한 Criteria 클래스&lt;/span&gt;&lt;/p&gt;&lt;p&gt;게시글 조회 쿼리에 전달될 파라미터를 담게 될 클래스이다. VO라고 생각하면 쉬울 것이다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;Criteria&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;18&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;19&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;20&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;21&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;22&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;23&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;24&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;25&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;26&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;27&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;28&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;29&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;30&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;31&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;32&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;33&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;34&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;35&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;36&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;37&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;class&lt;/span&gt;&amp;nbsp;Criteria&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;private&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;int&lt;/span&gt;&amp;nbsp;page;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;private&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;int&lt;/span&gt;&amp;nbsp;perPageNum;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;int&lt;/span&gt;&amp;nbsp;getPageStart()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;return&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color:#ff3399&quot;&gt;this&lt;/span&gt;.page&lt;span style=&quot;color:#ff3399&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#308ce5&quot;&gt;1&lt;/span&gt;)&lt;span style=&quot;color:#ff3399&quot;&gt;*&lt;/span&gt;perPageNum;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;Criteria()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;this&lt;/span&gt;.page&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#308ce5&quot;&gt;1&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;this&lt;/span&gt;.perPageNum&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#308ce5&quot;&gt;10&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;int&lt;/span&gt;&amp;nbsp;getPage()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;return&lt;/span&gt;&amp;nbsp;page;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;void&lt;/span&gt;&amp;nbsp;setPage(&lt;span style=&quot;color:#0099cc&quot;&gt;int&lt;/span&gt;&amp;nbsp;page)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;if&lt;/span&gt;(page&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#308ce5&quot;&gt;0&lt;/span&gt;)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;this&lt;/span&gt;.page&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#308ce5&quot;&gt;1&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;else&lt;/span&gt;&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;this&lt;/span&gt;.page&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;page;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;int&lt;/span&gt;&amp;nbsp;getPerPageNum()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;return&lt;/span&gt;&amp;nbsp;perPageNum;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;void&lt;/span&gt;&amp;nbsp;setPerPageNum(&lt;span style=&quot;color:#0099cc&quot;&gt;int&lt;/span&gt;&amp;nbsp;pageCount)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;int&lt;/span&gt;&amp;nbsp;cnt&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;this&lt;/span&gt;.perPageNum;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;if&lt;/span&gt;(pageCount&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;!&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;cnt)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;this&lt;/span&gt;.perPageNum&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;cnt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;else&lt;/span&gt;&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;this&lt;/span&gt;.perPageNum&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;pageCount;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;ul style=&quot;list-style-type: disc;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;int page&lt;/span&gt; : 현재 페이지 번호&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;int perPageNum&lt;/span&gt; : 한 페이지당 보여줄 게시글의 갯수&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;int getPageStart()&lt;/span&gt; : 특정 페이지의 게시글 시작 번호, 게시글 시작 행 번호&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;p&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;//현재&amp;nbsp;페이지의&amp;nbsp;게시글&amp;nbsp;시작&amp;nbsp;번호&amp;nbsp;=&amp;nbsp;(현재&amp;nbsp;페이지&amp;nbsp;번호&amp;nbsp;-&amp;nbsp;1)&amp;nbsp;*&amp;nbsp;페이지당&amp;nbsp;보여줄&amp;nbsp;게시글&amp;nbsp;갯수&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;getPerPageNum&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;=&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color:#a71d5d&quot;&gt;this&lt;/span&gt;.page&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;-&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;1&lt;/span&gt;)&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;*&lt;/span&gt;&amp;nbsp;perPageNum&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 0.5;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;table class=&quot;txc-table&quot; width=&quot;666&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; style=&quot;border: none; border-collapse: collapse; width: 666px;&quot; 맑은=&quot;&quot; 고딕&quot;,=&quot;&quot; sans-serif;font-size:13px&quot;=&quot;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;width: 124px; height: 24px; border-width: 1px; border-style: solid; border-color: rgb(0, 0, 0) rgb(217, 217, 217) rgb(0, 0, 0) rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;현재 페이지 번호&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 178px; height: 24px; border-bottom: 1px solid rgb(0, 0, 0); border-right: 1px solid rgb(217, 217, 217); border-top: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;페이지당 보여줄 게시글 수&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 202px; height: 24px; border-bottom: 1px solid rgb(0, 0, 0); border-right: 1px solid rgb(217, 217, 217); border-top: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;계산식&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 162px; height: 24px; border-bottom: 1px solid rgb(0, 0, 0); border-right: 1px solid rgb(0, 0, 0); border-top: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;게시글 시작 행 번호&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;width: 124px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-left: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;5&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 178px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;10&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 202px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;(5-1)*10&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 162px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;40&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;width: 124px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-left: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;3&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 178px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;5&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 202px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;(3-1)*5&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 162px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;10&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;width: 124px; height: 24px; border-bottom: 1px solid rgb(0, 0, 0); border-right: 1px solid rgb(217, 217, 217); border-left: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;15&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 178px; height: 24px; border-bottom: 1px solid rgb(0, 0, 0); border-right: 1px solid rgb(217, 217, 217); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;10&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 202px; height: 24px; border-bottom: 1px solid rgb(0, 0, 0); border-right: 1px solid rgb(217, 217, 217); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;(15-1)*10&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 162px; height: 24px; border-bottom: 1px solid rgb(0, 0, 0); border-right: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;140&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;
&lt;ul style=&quot;list-style-type: disc;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;Criteria()&lt;/span&gt; : 기본 생성자&lt;/li&gt;&lt;/ul&gt;
&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#a71d5d&quot;&gt;this&lt;/span&gt;.page&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;1&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#a71d5d&quot;&gt;this&lt;/span&gt;.perPageNum&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;10&lt;/span&gt;;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;최초로 게시판 목록에 들어 왔을 때를 위해서 기본 셋팅을 해야 한다. 왜냐하면 페이징을 처리하기 위해선 현재 페이지 번호와 페이지당 게시글 수가 필요한데&amp;nbsp;처음 게시판에 들어오게 되면 두 개의 정보를 가져올 방법이 없기 때문에&amp;nbsp;기본 생성자를 통해 기본 값을 셋팅하도록 하자. 현재 페이지를 1페이지로, 페이지당 보여줄 게시글의 수를 10개로 기본 셋팅해두었다.&lt;/p&gt;
&lt;ul style=&quot;list-style-type: disc;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;setter&lt;/span&gt; : 잘 못된 값들이 셋팅되지 않게 적절하게 set 메서드 셋팅&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;- setPage() : 페이지가 음수값이 되지 않게 설정. 음수가 되면 1페이지를 나타낸다.&lt;/div&gt;&lt;div&gt;- setPerPageNum() : 페이지당 보여줄 게시글 수가 변하지 않게 설정했다.&lt;/div&gt;&lt;ul style=&quot;list-style-type: disc;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;getter&lt;/span&gt; : get 메서드를 셋팅&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;5. 게시판 페이징을 처리하는 PageMaker 클래스&lt;/span&gt;&lt;/p&gt;&lt;p&gt;페이징에 관련된 버튼들을 만드는 기능을 하는 클래스이다. 페이지에 페이징 버튼들을 만들기 위한 계산 클래스라고 생각하면 된다. 그래서 계산이 필요한 부분이 많다.(ㅠㅠ) 하지만 그냥 공식이라 생각하고 이렇게 쓰는구나, 정도의 이해만 하고 넘어가도 된다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;PageMaker&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important;overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0;padding:0;border:none;background-color:#fafafa;border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px;border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0;padding:0;word-break:normal;text-align:right;color:#666;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;18&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;19&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;20&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;21&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;22&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;23&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;24&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;25&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;26&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;27&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;28&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;29&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;30&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;31&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;32&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;33&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;34&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;35&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;36&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;37&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;38&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;39&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;40&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;41&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;42&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;43&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;44&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;45&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;46&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;47&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;48&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;49&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;50&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;51&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;52&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;53&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;54&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;55&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;56&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;57&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;58&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;59&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;60&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;61&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;62&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;63&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;64&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;65&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;66&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;67&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;68&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;69&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;70&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;71&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;72&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;73&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding: 6px 0px;&quot;&gt;&lt;div style=&quot;margin:0;padding:0;color:#010101;font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#a71d5d&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;class&lt;/span&gt;&amp;nbsp;PageMaker&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;private&lt;/span&gt;&amp;nbsp;Criteria&amp;nbsp;cri;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;private&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#066de2&quot;&gt;int&lt;/span&gt;&amp;nbsp;totalCount;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;private&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#066de2&quot;&gt;int&lt;/span&gt;&amp;nbsp;startPage;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;private&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#066de2&quot;&gt;int&lt;/span&gt;&amp;nbsp;endPage;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;private&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#066de2&quot;&gt;boolean&lt;/span&gt;&amp;nbsp;prev;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;private&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#066de2&quot;&gt;boolean&lt;/span&gt;&amp;nbsp;next;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;private&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#066de2&quot;&gt;int&lt;/span&gt;&amp;nbsp;displayPageNum&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;5&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;public&lt;/span&gt;&amp;nbsp;Criteria&amp;nbsp;getCri()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;return&lt;/span&gt;&amp;nbsp;cri;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;void&lt;/span&gt;&amp;nbsp;setCri(Criteria&amp;nbsp;cri)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;this&lt;/span&gt;.cri&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;=&lt;/span&gt;&amp;nbsp;cri;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#066de2&quot;&gt;int&lt;/span&gt;&amp;nbsp;getTotalCount()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;return&lt;/span&gt;&amp;nbsp;totalCount;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;void&lt;/span&gt;&amp;nbsp;setTotalCount(&lt;span style=&quot;color:#066de2&quot;&gt;int&lt;/span&gt;&amp;nbsp;totalCount)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;this&lt;/span&gt;.totalCount&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;=&lt;/span&gt;&amp;nbsp;totalCount;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;calcData();&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;private&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;void&lt;/span&gt;&amp;nbsp;calcData()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;endPage&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;=&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color:#066de2&quot;&gt;int&lt;/span&gt;)&amp;nbsp;(Math.ceil(cri.getPage()&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;/&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color:#066de2&quot;&gt;double&lt;/span&gt;)&amp;nbsp;displayPageNum)&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;*&lt;/span&gt;&amp;nbsp;displayPageNum);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;startPage&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;=&lt;/span&gt;&amp;nbsp;(endPage&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;-&lt;/span&gt;&amp;nbsp;displayPageNum)&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;+&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;1&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;if&lt;/span&gt;(startPage&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#a71d5d&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;0&lt;/span&gt;)&amp;nbsp;startPage&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;1&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#066de2&quot;&gt;int&lt;/span&gt;&amp;nbsp;tempEndPage&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;=&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color:#066de2&quot;&gt;int&lt;/span&gt;)&amp;nbsp;(Math.ceil(totalCount&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;/&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color:#066de2&quot;&gt;double&lt;/span&gt;)&amp;nbsp;cri.getPerPageNum()));&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;if&lt;/span&gt;&amp;nbsp;(endPage&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;tempEndPage)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;endPage&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;=&lt;/span&gt;&amp;nbsp;tempEndPage;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;prev&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;=&lt;/span&gt;&amp;nbsp;startPage&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#a71d5d&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;1&lt;/span&gt;&amp;nbsp;?&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;false&lt;/span&gt;&amp;nbsp;:&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;true&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;next&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;=&lt;/span&gt;&amp;nbsp;endPage&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;*&lt;/span&gt;&amp;nbsp;cri.getPerPageNum()&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;&amp;lt;&lt;/span&gt;&amp;nbsp;totalCount&amp;nbsp;?&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;true&lt;/span&gt;&amp;nbsp;:&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;false&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#066de2&quot;&gt;int&lt;/span&gt;&amp;nbsp;getStartPage()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;return&lt;/span&gt;&amp;nbsp;startPage;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;void&lt;/span&gt;&amp;nbsp;setStartPage(&lt;span style=&quot;color:#066de2&quot;&gt;int&lt;/span&gt;&amp;nbsp;startPage)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;this&lt;/span&gt;.startPage&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;=&lt;/span&gt;&amp;nbsp;startPage;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#066de2&quot;&gt;int&lt;/span&gt;&amp;nbsp;getEndPage()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;return&lt;/span&gt;&amp;nbsp;endPage;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;void&lt;/span&gt;&amp;nbsp;setEndPage(&lt;span style=&quot;color:#066de2&quot;&gt;int&lt;/span&gt;&amp;nbsp;endPage)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;this&lt;/span&gt;.endPage&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;=&lt;/span&gt;&amp;nbsp;endPage;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#066de2&quot;&gt;boolean&lt;/span&gt;&amp;nbsp;isPrev()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;return&lt;/span&gt;&amp;nbsp;prev;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;void&lt;/span&gt;&amp;nbsp;setPrev(&lt;span style=&quot;color:#066de2&quot;&gt;boolean&lt;/span&gt;&amp;nbsp;prev)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;this&lt;/span&gt;.prev&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;=&lt;/span&gt;&amp;nbsp;prev;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#066de2&quot;&gt;boolean&lt;/span&gt;&amp;nbsp;isNext()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;return&lt;/span&gt;&amp;nbsp;next;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;void&lt;/span&gt;&amp;nbsp;setNext(&lt;span style=&quot;color:#066de2&quot;&gt;boolean&lt;/span&gt;&amp;nbsp;next)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;this&lt;/span&gt;.next&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;=&lt;/span&gt;&amp;nbsp;next;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#066de2&quot;&gt;int&lt;/span&gt;&amp;nbsp;getDisplayPageNum()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;return&lt;/span&gt;&amp;nbsp;displayPageNum;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;void&lt;/span&gt;&amp;nbsp;setDisplayPageNum(&lt;span style=&quot;color:#066de2&quot;&gt;int&lt;/span&gt;&amp;nbsp;displayPageNum)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;this&lt;/span&gt;.displayPageNum&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;=&lt;/span&gt;&amp;nbsp;displayPageNum;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right;margin-top:-13px;margin-right:5px;font-size:9px;font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom;padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p style=&quot;color: rgb(0, 0, 0); font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;- 22행: 총 게시글 수를 셋팅할때 calcData() 메서드를&amp;nbsp;호출하여 페이징 관련 버튼 계산을 한다.&lt;/p&gt;&lt;p style=&quot;color: rgb(0, 0, 0); font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;- 25행: 페이징의 버튼들을 생성하는 계산식을 만들었다. 끝 페이지 번호, 시작 페이지 번호, 이전, 다음 버튼들을 구한다.&lt;/p&gt;&lt;ul style=&quot;list-style-type: disc;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;Criteria cri.getPage()&lt;/span&gt; : 현재 페이지 번호&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;list-style-type: disc;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;Criteria cri.getPerPageNum()&lt;/span&gt; : 한 페이지당 보여줄 게시글의 갯수&lt;/li&gt;&lt;/ul&gt;&lt;ul style=&quot;list-style-type: disc;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;int totalCount&lt;/span&gt; : 총 게시글 수&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;SELECT&lt;/span&gt;&amp;nbsp;count(&lt;span style=&quot;color:#0099cc&quot;&gt;*&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;FROM&lt;/span&gt;&amp;nbsp;board&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;조회 쿼리에서 count(*)를 이용해서 구해야 한다. 총 게시글 수 쿼리는 조금 있다가 설정할 것이다.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul style=&quot;list-style-type: disc;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;int&amp;nbsp;endPage&lt;/span&gt; : 화면에 보여질 마지막 페이지 번호, 끝 페이지 번호&lt;/li&gt;&lt;/ul&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;/div&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;//끝&amp;nbsp;페이지&amp;nbsp;번호&amp;nbsp;=&amp;nbsp;(현재 페이지 번호 / 화면에&amp;nbsp;보여질&amp;nbsp;페이지&amp;nbsp;번호의&amp;nbsp;갯수) * 화면에&amp;nbsp;보여질&amp;nbsp;페이지&amp;nbsp;번호의&amp;nbsp;갯수&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;endPage&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color:#0099cc&quot;&gt;int&lt;/span&gt;)&amp;nbsp;(Math.ceil(cri.getPage()&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;/&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color:#0099cc&quot;&gt;double&lt;/span&gt;)&amp;nbsp;displayPageNum)&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;*&lt;/span&gt;&amp;nbsp;displayPageNum);&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;table class=&quot;txc-table&quot; width=&quot;629&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; style=&quot;border: none; border-collapse: collapse; width: 629px;&quot; 맑은=&quot;&quot; 고딕&quot;,=&quot;&quot; sans-serif;font-size:13px&quot;=&quot;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;width: 113px; height: 24px; border-width: 1px; border-style: solid; border-color: rgb(0, 0, 0) rgb(217, 217, 217) rgb(0, 0, 0) rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;현재 페이지 번호&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 140px; height: 24px; border-bottom: 1px solid rgb(0, 0, 0); border-right: 1px solid rgb(217, 217, 217); border-top: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;페이지 번호의 갯수&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 237px; height: 24px; border-bottom: 1px solid rgb(0, 0, 0); border-right: 1px solid rgb(217, 217, 217); border-top: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;계산식&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 137px; height: 24px; border-bottom: 1px solid rgb(0, 0, 0); border-right: 1px solid rgb(0, 0, 0); border-top: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;끝 페이지 번호&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;width: 113px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-left: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;1&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 140px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;10&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 237px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;Math.ceil(1/10) * 10&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 137px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;10&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;width: 113px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-left: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;3&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 140px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;10&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 237px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;Math.ceil(3/10) * 10&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 137px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;10&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;width: 113px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-left: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;13&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 140px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;10&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 237px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;Math.ceil(13/10) * 10&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 137px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;20&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;width: 113px; height: 24px; border-bottom: 1px solid rgb(0, 0, 0); border-right: 1px solid rgb(217, 217, 217); border-left: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;23&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 140px; height: 24px; border-bottom: 1px solid rgb(0, 0, 0); border-right: 1px solid rgb(217, 217, 217); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;20&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 237px; height: 24px; border-bottom: 1px solid rgb(0, 0, 0); border-right: 1px solid rgb(217, 217, 217); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;Math.ceil(23/20) * 20&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 137px; height: 24px; border-bottom: 1px solid rgb(0, 0, 0); border-right: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;40&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;끝 페이지 번호는 총 게시글 수와 연관이 있다. 근데 100개의 게시글을 20개씩 보여준다고 하면 끝 페이지의 번호가 5여야 하는데&amp;nbsp;위의 계산식으로 계산을 하게 되면 끝 페이지 번호가 20이 나오게 된다. ( Math.ceil(1/20)*20 = 20 ) 그래서 총 게시글 수와 페이지당 보여줄 게시글의 갯수로 마지막 페이지 번호를 구해 서로 비교해서 화면에 보여질&amp;nbsp;끝 페이지 번호를 구해야 한다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;//마지막&amp;nbsp;페이지&amp;nbsp;번호&amp;nbsp;=&amp;nbsp;총&amp;nbsp;게시글&amp;nbsp;수&amp;nbsp;/&amp;nbsp;한&amp;nbsp;페이지당&amp;nbsp;보여줄&amp;nbsp;게시글의&amp;nbsp;갯수&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;int&lt;/span&gt;&amp;nbsp;tempEndPage&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color:#0099cc&quot;&gt;int&lt;/span&gt;)&amp;nbsp;(Math.ceil(totalCount&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;/&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color:#0099cc&quot;&gt;double&lt;/span&gt;)&amp;nbsp;cri.getPerPageNum()));&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;if&lt;/span&gt;&amp;nbsp;(endPage&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;tempEndPage)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;endPage&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;tempEndPage;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;마지막 페이지의 번호를 구한 뒤,&amp;nbsp;끝 페이지 번호보다 작은 경우에 마지막 페이지의 번호를 끝 페이지 번호로 저장해준다. 화면에 보여질 끝 페이지 번호는 마지막 페이지의 번호보다 클 수는 없다. 그렇기 때문에 위와 같은 조건을 넣어줘야 한다. 이 부분은 시작 페이지 번호까지 구한 뒤에 처리해줘야 한다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul style=&quot;list-style-type: disc;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;int startPage&lt;/span&gt; : 화면에 보여질 첫번째 페이지 번호, 시작 페이지 번호&lt;/li&gt;&lt;/ul&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;//시작&amp;nbsp;페이지&amp;nbsp;번호&amp;nbsp;=&amp;nbsp;(끝&amp;nbsp;페이지&amp;nbsp;번호&amp;nbsp;-&amp;nbsp;화면에&amp;nbsp;보여질&amp;nbsp;페이지&amp;nbsp;번호의&amp;nbsp;갯수)&amp;nbsp;+&amp;nbsp;1&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;startPage&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;=&lt;/span&gt;&amp;nbsp;(endPage&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;-&lt;/span&gt;&amp;nbsp;displayPageNum)&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;+&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;1&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#a71d5d&quot;&gt;if&lt;/span&gt;(startPage&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#a71d5d&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;0&lt;/span&gt;)&amp;nbsp;startPage&amp;nbsp;&lt;span style=&quot;color:#a71d5d&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;1&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;table class=&quot;txc-table&quot; width=&quot;676&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; style=&quot;border: none; border-collapse: collapse; width: 676px;&quot; 맑은=&quot;&quot; 고딕&quot;,=&quot;&quot; sans-serif;font-size:13px&quot;=&quot;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;width: 143px; height: 24px; border-width: 1px; border-style: solid; border-color: rgb(0, 0, 0) rgb(217, 217, 217) rgb(0, 0, 0) rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;끝 페이지 번호&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 161px; height: 24px; border-bottom: 1px solid rgb(0, 0, 0); border-right: 1px solid rgb(217, 217, 217); border-top: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;페이지 번호의 갯수&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 206px; height: 24px; border-bottom: 1px solid rgb(0, 0, 0); border-right: 1px solid rgb(217, 217, 217); border-top: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;계산식&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 166px; height: 24px; border-bottom: 1px solid rgb(0, 0, 0); border-right: 1px solid rgb(0, 0, 0); border-top: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;시작 페이지 번호&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;width: 143px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-left: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;10&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 161px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;10&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 206px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;(10-10) + 1&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 166px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;1&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;width: 143px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-left: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;30&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 161px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;10&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 206px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;(30-20) + 1&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 166px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;11&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;width: 143px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-left: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;40&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 161px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;20&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 206px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;(40-20) + 1&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 166px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;21&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;width: 143px; height: 24px; border-bottom: 1px solid rgb(0, 0, 0); border-right: 1px solid rgb(217, 217, 217); border-left: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;20&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 161px; height: 24px; border-bottom: 1px solid rgb(0, 0, 0); border-right: 1px solid rgb(217, 217, 217); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;5&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 206px; height: 24px; border-bottom: 1px solid rgb(0, 0, 0); border-right: 1px solid rgb(217, 217, 217); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;(20-5) + 1&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 166px; height: 24px; border-bottom: 1px solid rgb(0, 0, 0); border-right: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;16&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;시작 페이지 번호를 구할 때, 마지막 페이지 번호가 화면에 보여질 페이징 버튼의 갯수보다 작으면 문제가 생긴다. 시작 페이지 번호가 음수가 되어버리는 상황이 발생한다. 예를들면&amp;nbsp;끝 페이지의 번호가 3이고, 보여줄 페이지 갯수가 5라면, 시작 페이지 번호는 -1이 된다. 따라서, 구한 시작페이지 번호가 0보다 작으면(음수) 시작 페이지를 1로 해주는 로직을 추가해야 한다.&lt;/p&gt;&lt;ul style=&quot;list-style-type: disc;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;boolean&amp;nbsp;prev&lt;/span&gt; : 이전 버튼 생성 여부&lt;/li&gt;&lt;/ul&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;//이전&amp;nbsp;버튼&amp;nbsp;생성&amp;nbsp;여부&amp;nbsp;=&amp;nbsp;시작&amp;nbsp;페이지&amp;nbsp;번호 == 1&amp;nbsp;?&amp;nbsp;false&amp;nbsp;:&amp;nbsp;true&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;prev&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;startPage&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#308ce5&quot;&gt;1&lt;/span&gt;&amp;nbsp;?&amp;nbsp;&lt;span style=&quot;color:#308ce5&quot;&gt;false&lt;/span&gt;&amp;nbsp;:&amp;nbsp;&lt;span style=&quot;color:#308ce5&quot;&gt;true&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;이전 버튼은 시작 페이지 번호가 1이 아니면 생기면 된다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul style=&quot;list-style-type: disc;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;boolean next&lt;/span&gt; : 다음 버튼 생성 여부&lt;/li&gt;&lt;/ul&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin: 0px; padding: 0px; line-height: 130%; font-family: Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace !important;&quot;&gt;&lt;div style=&quot;color: rgb(1, 1, 1); padding: 0px 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;//다음&amp;nbsp;버튼&amp;nbsp;생성&amp;nbsp;여부&amp;nbsp;=&amp;nbsp;끝&amp;nbsp;페이지&amp;nbsp;번호&amp;nbsp;*&amp;nbsp;한&amp;nbsp;페이지당&amp;nbsp;보여줄&amp;nbsp;게시글의&amp;nbsp;갯수&amp;nbsp;&amp;lt;&amp;nbsp;총&amp;nbsp;게시글의&amp;nbsp;수&amp;nbsp;?&amp;nbsp;true:&amp;nbsp;false&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding: 0px 6px; white-space: pre; line-height: 130%;&quot;&gt;&lt;font color=&quot;#010101&quot;&gt;next&amp;nbsp;&lt;/font&gt;&lt;span style=&quot;color: rgb(255, 51, 153);&quot;&gt;=&lt;/span&gt;&lt;font color=&quot;#010101&quot;&gt;&amp;nbsp;endPage&amp;nbsp;&lt;/font&gt;&lt;span style=&quot;color: rgb(255, 51, 153);&quot;&gt;*&lt;/span&gt;&lt;font color=&quot;#010101&quot;&gt;&amp;nbsp;cri.getPerPageNum()&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#ff3399&quot;&gt;&amp;lt;&lt;/font&gt;&lt;font color=&quot;#010101&quot;&gt;&amp;nbsp;totalCount&amp;nbsp;?&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#308ce5&quot;&gt;true&lt;/font&gt;&lt;font color=&quot;#010101&quot;&gt;:&amp;nbsp;&lt;/font&gt;&lt;span style=&quot;color: rgb(48, 140, 229);&quot;&gt;false&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;table class=&quot;txc-table&quot; width=&quot;728&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; style=&quot;border: none; border-collapse: collapse; width: 728px;&quot; 맑은=&quot;&quot; 고딕&quot;,=&quot;&quot; sans-serif;font-size:13px&quot;=&quot;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;width: 111px; height: 24px; border-width: 1px; border-style: solid; border-color: rgb(0, 0, 0) rgb(217, 217, 217) rgb(0, 0, 0) rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;끝 페이지 번호&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 137px; height: 24px; border-bottom: 1px solid rgb(0, 0, 0); border-right: 1px solid rgb(217, 217, 217); border-top: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;페이지당 게시글 수&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 114px; height: 24px; border-bottom: 1px solid rgb(0, 0, 0); border-right: 1px solid rgb(217, 217, 217); border-top: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;총 게시글 수&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 233px; height: 24px; border-bottom: 1px solid rgb(0, 0, 0); border-right: 1px solid rgb(217, 217, 217); border-top: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;계산식&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 133px; height: 24px; border-bottom: 1px solid rgb(0, 0, 0); border-right: 1px solid rgb(0, 0, 0); border-top: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;다음 버튼 생성 여부&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;width: 111px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-left: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;7&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 137px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;10&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 114px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;65&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 233px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;7 * 10 &amp;lt;&amp;nbsp;65&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 133px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;false&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;width: 111px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-left: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;10&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 137px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;10&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 114px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;100&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 233px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;10 * 10 &amp;lt;&amp;nbsp;100&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 133px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;false&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;width: 111px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-left: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;10&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 137px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;10&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 114px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;127&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 233px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;10 * 10 &amp;lt;&amp;nbsp;107&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 133px; height: 24px; border-bottom: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;true&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;width: 111px; height: 24px; border-bottom: 1px solid rgb(0, 0, 0); border-right: 1px solid rgb(217, 217, 217); border-left: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;20&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 137px; height: 24px; border-bottom: 1px solid rgb(0, 0, 0); border-right: 1px solid rgb(217, 217, 217); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;10&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 114px; height: 24px; border-bottom: 1px solid rgb(0, 0, 0); border-right: 1px solid rgb(217, 217, 217); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;260&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 233px; height: 24px; border-bottom: 1px solid rgb(0, 0, 0); border-right: 1px solid rgb(217, 217, 217); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;20 * 10 &amp;lt;&amp;nbsp;260&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 133px; height: 24px; border-bottom: 1px solid rgb(0, 0, 0); border-right: 1px solid rgb(0, 0, 0); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;true&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul style=&quot;list-style-type: disc;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;int displayPageNum&lt;/span&gt; : 화면 하단에 보여지는 페이지 버튼의 수&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;보여지는 버튼의 수를 정하면 된다. 나는 5개만 보이게 할 것이다.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;PageMaker 객체를 사용하려면 setCri() 와 setTotalCount()를 먼저 호출해서 값을 셋팅해야 한다. 페이징 버튼들의 값을 구하려면 제일 먼저 총 게시글 수가 있어야 위의 계산식대로 차례로 구할 수 있다. 그렇기에 총 게시글을 셋팅할 때 계산식 메소드를 호출하게 한 것이다. 또한 Criteria 객체에서 필요한 page 와 perPageNum을 사용하기 위해서 setCri()를 먼저 셋팅해야 한다. 컨트롤러에서 객체로 값을 셋팅할 때 유의하자.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;6. 목록 조회 수정&lt;/span&gt;&lt;/p&gt;&lt;p&gt;** 이전에 만들어 둔 CURD 게시판을 수정해서 사용한다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;6-1. Controller&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;@RequestMapping(value&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#993333&quot;&gt;&quot;/board/boardList&quot;&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;ModelAndView&amp;nbsp;openBoardList(Criteria&amp;nbsp;cri)&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;throws&lt;/span&gt;&amp;nbsp;Exception&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ModelAndView&amp;nbsp;mav&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;new&lt;/span&gt;&amp;nbsp;ModelAndView(&lt;span style=&quot;color:#993333&quot;&gt;&quot;/board/boardList&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PageMaker&amp;nbsp;pageMaker&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;new&lt;/span&gt;&amp;nbsp;PageMaker();&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;pageMaker.setCri(cri);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;pageMaker.setTotalCount(&lt;span style=&quot;color:#308ce5&quot;&gt;100&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;List&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;Map&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;,Object&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;list&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;=&lt;/span&gt;&amp;nbsp;boardServcie.selectBoardList(cri);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mav.addObject(&lt;span style=&quot;color:#993333&quot;&gt;&quot;list&quot;&lt;/span&gt;,&amp;nbsp;list);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mav.addObject(&lt;span style=&quot;color:#993333&quot;&gt;&quot;pageMaker&quot;&lt;/span&gt;,&amp;nbsp;pageMaker);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;return&lt;/span&gt;&amp;nbsp;mav;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;- 02행: 현재 페이지 번호와 페이지당 보여줄 게시글 수가 담긴 Criteria 객체를 사용한다.&lt;/p&gt;&lt;p&gt;- 06행: PageMaker() 객체를 생성한다.&lt;/p&gt;&lt;p&gt;- 07행: page와 perPageNum을 셋팅해준다.&lt;/p&gt;&lt;p&gt;- 08행: 총 게시글의 수를 셋팅해준다. 아직 총 게시글 수를 조회하는 로직은 구현하지 않았기 때문에 현재 DB에 있는 총 게시글의 수인&amp;nbsp;100을 넣어줬다.&lt;/p&gt;&lt;p&gt;- 10행: 원래의 목록 조회 로직에서&amp;nbsp;Criteria 파라미터를 사용하기 위해 수정했다.&lt;/p&gt;&lt;p&gt;- 12행: 셋팅된 pageMaker에는 페이징을 위한 버튼의 값들이 들어있고 ModelAndView를 이용해 jsp에 넘겨준다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;6-2. Service 영역 및 DAO&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;//BoardService&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;List&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;Map&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;selectBoardList(Criteria&amp;nbsp;cri);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;//BoardServiceImpl&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;@Override&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;List&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;Map&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;selectBoardList(Criteria&amp;nbsp;cri)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;return&lt;/span&gt;&amp;nbsp;boardDAO.selectBoardList(cri);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;//BoardDAO&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;@SuppressWarnings(&lt;span style=&quot;color:#993333&quot;&gt;&quot;unchecked&quot;&lt;/span&gt;)&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;List&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;Map&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;,&amp;nbsp;Object&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;selectBoardList(Criteria&amp;nbsp;cri)&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;return&lt;/span&gt;&amp;nbsp;(List&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;Map&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;String&lt;/span&gt;,Object&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;&amp;gt;&lt;/span&gt;)selectList(&lt;span style=&quot;color:#993333&quot;&gt;&quot;board.selectBoardList&quot;&lt;/span&gt;,&amp;nbsp;cri);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;게시글 목록 조회하는 Service, DAO 영역에 Criteria 객체에 담긴 파라마터를 보내기 위해 수정했다. 각자의 목록 조회에 맞게 수정하면 된다. Criteria 객체에 담아서 SQL 매핑에&amp;nbsp;보낼&amp;nbsp;파라미터는 특정 페이지 게시글의 행(pageStart)과&amp;nbsp;페이지당 보여줄 게시글의 갯수(perPageNum)이다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;6-3. SQL&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;select&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;selectBoardList&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;resultType&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;hashmap&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;parameterType&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;hashmap&quot;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;![CDATA[&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;SELECT&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;*&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;FROM&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;board&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;WHERE&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;DEL_CHK&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color:#52be14&quot;&gt;'N'&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;ORDER&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;BY&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;IDX&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;DESC&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;LIMIT&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;#{pageStart},&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;#{perPageNum}&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;]]&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;select&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;- 10행: 페이징 조회를 위해 LIMIT를 이용해서 원래의 목록 조회 쿼리를 수정했다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;6-4. JSP&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;11&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;12&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;13&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;14&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;15&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;16&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;17&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;ul&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;btn-group&amp;nbsp;pagination&quot;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;c:if&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;test&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;${pageMaker.prev&amp;nbsp;}&quot;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;li&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;a&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;href&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;'&amp;lt;c:url&amp;nbsp;value=&quot;/board/boardList?page=${pageMaker.startPage-1&amp;nbsp;}&quot;/&amp;gt;'&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;i&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;fa&amp;nbsp;fa-chevron-left&quot;&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;i&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;a&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;li&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;c:if&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;c:forEach&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;begin&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;${pageMaker.startPage&amp;nbsp;}&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;end&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;${pageMaker.endPage&amp;nbsp;}&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;var&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;pageNum&quot;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;li&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;a&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;href&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;'&amp;lt;c:url&amp;nbsp;value=&quot;/board/boardList?page=${pageNum&amp;nbsp;}&quot;/&amp;gt;'&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;i&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;fa&quot;&lt;/span&gt;&amp;gt;${pageNum&amp;nbsp;}&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;i&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;a&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;li&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;c:forEach&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;c:if&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;test&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;${pageMaker.next&amp;nbsp;&amp;amp;&amp;amp;&amp;nbsp;pageMaker.endPage&amp;nbsp;&amp;gt;0&amp;nbsp;}&quot;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;li&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;a&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;href&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;'&amp;lt;c:url&amp;nbsp;value=&quot;/board/boardList?page=${pageMaker.endPage+1&amp;nbsp;}&quot;/&amp;gt;'&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&quot;color:#066de2&quot;&gt;i&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0a9989&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color:#df5000&quot;&gt;&quot;fa&amp;nbsp;fa-chevron-right&quot;&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;i&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;a&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;li&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;c:if&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#066de2&quot;&gt;ul&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;- 02행: 이전 버튼의 생성 여부를 확인하여 버튼을 보여줄 것이다.&lt;/p&gt;&lt;p&gt;- 06행: 현재 페이지가 어디인 지 알기 위해 추가했다.&lt;/p&gt;&lt;p&gt;- 07행: 페이지의 시작 번호와 끝 번호를 이용해 페이지 버튼들을 뿌려줄 것이다.&lt;/p&gt;&lt;p&gt;- 12행: 다음 버튼의 생성 여부를 확인하여 버튼을 보여줄 것이다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;7. 총&amp;nbsp;게시글 갯수 구하기 (totalCount)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;그럼 마지막으로 총 게시글 갯수를 구하는 로직을 만들자.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;7-1. SQL&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;9&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;10&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;select&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;id&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;countBoardList&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;resultType&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;&quot;Integer&quot;&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;span style=&quot;color:#ff3399&quot;&gt;![CDATA[&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;SELECT&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;count(*)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;FROM&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;board&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;WHERE&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;DEL_CHK&lt;/span&gt;=&lt;span style=&quot;color:#52be14&quot;&gt;'N'&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;]]&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;lt;/&lt;span style=&quot;color:#ff3399&quot;&gt;select&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;- 01행: 결과는 int로 리턴되어야 한다.&lt;/p&gt;&lt;p&gt;- 04행: 조회한 결과의 갯수를 뿌려주는 쿼리이다.&lt;/p&gt;&lt;p&gt;- 08행: 총 게시글 중에 삭제된 건 빼야 한다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;7-2. DAO&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;int&lt;/span&gt;&amp;nbsp;countBoardList(){&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;return&lt;/span&gt;&amp;nbsp;(Integer)&amp;nbsp;selectOne(&lt;span style=&quot;color:#993333&quot;&gt;&quot;board.countBoardList&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;7-3. Service 영역&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;2&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;3&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;4&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;5&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;6&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;7&lt;/div&gt;&lt;div style=&quot;line-height:130%&quot;&gt;8&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;//Service&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#0099cc&quot;&gt;int&lt;/span&gt;&amp;nbsp;countBoardListTotal();&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#999999&quot;&gt;//ServiceImpl&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;@Override&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&lt;span style=&quot;color:#ff3399&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color:#0099cc&quot;&gt;int&lt;/span&gt;&amp;nbsp;countBoardListTotal()&amp;nbsp;{&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#ff3399&quot;&gt;return&lt;/span&gt;&amp;nbsp;boardDAO.countBoardList();&lt;/div&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right; margin-top:-13px; margin-right:5px; font-size:9px; font-style:italic&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: rgb(229, 229, 229);&quot;&gt;Colored by Color Scripter&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;7-4. Controller&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;colorscripter-code&quot; style=&quot;color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; position:relative !important; overflow:auto&quot;&gt;&lt;table class=&quot;colorscripter-code-table&quot; style=&quot;margin:0; padding:0; border:none; background-color:#fafafa; border-radius:4px;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:6px; border-right:2px solid #e5e5e5&quot;&gt;&lt;div style=&quot;margin:0; padding:0; word-break:normal; text-align:right; color:#666; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;line-height:130%&quot;&gt;1&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 0&quot;&gt;&lt;div style=&quot;margin:0; padding:0; color:#010101; font-family:Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; line-height:130%&quot;&gt;&lt;div style=&quot;padding:0 6px; white-space:pre; line-height:130%&quot;&gt;&amp;nbsp;pageMaker.setTotalCount(boardServcie.countBoardListTotal());&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;vertical-align:bottom; padding:0 2px 4px 0&quot;&gt;&lt;a href=&quot;http://colorscripter.com/info#e&quot; target=&quot;_blank&quot; style=&quot;color: white;&quot;&gt;&lt;span style=&quot;font-size: 9px; word-break: normal; background-color: rgb(229, 229, 229); border-radius: 10px; padding: 1px;&quot;&gt;cs&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;100으로 셋팅한 부분에 총 게시글 수를 구하는 로직을 넣었다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;8. 확인&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 700px; width: 700px; height: 418px;; height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/99614D3D5C00DFA90A&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F99614D3D5C00DFA90A&quot; width=&quot;700&quot; height=&quot;418&quot; filename=&quot;24.PNG&quot; filemime=&quot;image/jpeg&quot; style=&quot;width: 700px; height: 418px;&quot; original=&quot;yes&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;밑에 페이징 버튼들이 나오고 10개의 게시글만 나왔다! 그럼 다른 페이지의 버튼를&amp;nbsp;눌러보자.&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 700px; width: 700px; height: 414px;; height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/99D50A395C00DFE012&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F99D50A395C00DFE012&quot; width=&quot;700&quot; height=&quot;414&quot; filename=&quot;25.PNG&quot; filemime=&quot;image/jpeg&quot; style=&quot;width: 700px; height: 414px;&quot; original=&quot;yes&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;페이지에 따라 목록이 바뀐다. 이전, 다음 버튼도 알맞게 구동된다!&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;페이징 처리에 성공했지만&amp;nbsp;아직 개선해야 될 부분이 남아있다. 페이징 원칙에서도 언급했는데, 특정 페이지의 한 게시글을 조회, 수정, 삭제를 하고 난 후에 다시 목록으로 돌아가게 될 경우 그 특정 페이지로 돌아가야 한다. 그 부분만 해결된다면 페이징 처리는 완성된것이다.&lt;/p&gt;</description>
      <category>공부/Spring</category>
      <category>Paging</category>
      <category>Spring Framework</category>
      <category>게시판 페이징</category>
      <category>스프링 페이징</category>
      <category>스프링 프레임워크</category>
      <category>페이징</category>
      <author>#에게</author>
      <guid isPermaLink="true">https://to-dy.tistory.com/90</guid>
      <comments>https://to-dy.tistory.com/90#entry90comment</comments>
      <pubDate>Fri, 30 Nov 2018 16:10:11 +0900</pubDate>
    </item>
  </channel>
</rss>