2013년 7월 27일 토요일

Spring3.2 Board) Spring 3.2에서 게시판 작성하기, 하나씩 따라하면서 만들기[1. 전체 기능 개요]

아래와 같은 주제로 스프링 게시판을 1차, 2차에 나누어서 하나씩 차근차근 작성하고자 한다.

Spring 게시판 구현

      


-  1차 목표 기능



기본 게시판 기능(리스트보기, 답글, 커멘트, 게시물 입력, 수정)
게시물 내용 미리보기(Ajax연동)

기술요소 : Ajax, Spring MVC, Spring JDBC, Spring DI



- 2차 목표 기능



기본 게시판 기능(리스트보기, 답글, 커멘트, 게시물 입력, 수정)
로그인 기능(인증한 경우에만 글읽기, 입력, 수정, 삭제 가능)
파일업로드
DB쪽 Spring AOP를 이용한 로깅
SQL문을 MyBatis를 이용하여 별도 XML로 관리

기술요소 : Ajax, Spring MVC, Spring JDBC, Spring DI, Spring AOP, MyBatis 결합





시작하기

-       이클립스 프로젝트명(Context) onjboard1
-       이클립스 STS Plug-In을 설치 하였으며 MAVEN, MAVEN Plug-In도 설치하였음
-       Spring MVC Project를 작성(프로젝트 이름은 onjboard1)
-       Spring Version 3.2.3
-       오라클에 접속하여 scott 계정에서 게시판용 테이블 및 데이터 2건 만들자


drop table board
create table board (
    seq number(10),
    name varchar2(20),
    passwd varchar2(20),
    title varchar2(500),
    content varchar2(4000),
    filename varchar2(100),
    regdate date default sysdate,
    readcount number(10),
    reply number(10),
    reply_step number(10),
    reply_level number(10)
)

drop table comment_t
create table comment_t(
    seq number(10),
    name varchar2(20),
    comm varchar2(4000)
)

drop sequence board_seq
create sequence board_seq start with 1 increment by 1

insert into board (seq, name, passwd, title, content, readcount, reply_step)
values (board_seq.nextval, '오엔제이', '1111', '질문입니다', 'SQL 배울 있는 과정이 뭐죠?', 0, 0)

insert into board (seq, name, passwd, title, content, readcount, reply_step)

values (board_seq.nextval, '오엔제이2', '1111', 'Spring강좌질문', '과정 추천해 주세요?', 0, 0) 


commit;


[출처]오라클자바커뮤니티, 오엔제이프로그래밍
www.onjprogramming.co.kr





다음 편에서는 web.xml 및 ContextLoadListener, DispatcherServlet  등에 대해 알아보자.






[출처]오라클자바커뮤니티
www.oraclejavacommunity.co.kr
<script type="text/javascript"></script> 

댓글 없음:

댓글 쓰기