1. Eclipse IDE 다운로드

www.eclipse.org -> Download

클릭하여 eclipse-inst-win64.exe 파일 다운로드

다운로드 받은 파일은 실행하여 Enterprise java Developers 선택하여 설치

 

2. 설치된 Eclipse 실행하여 Spring Boot 설치

Help - Eclipse Marketplace... 선택

Spring 검색하여 Spring Tools 4  - for Spring Boot 설치

3. File - New - Other에서 Spring Boot 항목 확인

 

'JAVA > Spring' 카테고리의 다른 글

[Spring] SiteMesh 설정 방법  (0) 2019.03.27
스프링 모듈 목록  (0) 2019.03.21
Eclipse에서 Spring Project 설정 (Maven)  (0) 2019.03.21

1. Jar File Download

http://wiki.sitemesh.org/wiki/display/sitemesh/Download

jar 다운로드. (테스트 버전 sitemesh-2.4.2.jar)


** Maven dependency 추가 

<!-- sitemesh -->

<dependency>

<groupId>opensymphony</groupId>

<artifactId>sitemesh</artifactId>

<version>2.4.2</version>

</dependency>



2.필터설정 (web.xml)

- filter를 설정하여 요청받은 url을 가로채기 위해 web.xml에 아래 설정을 추가한다.

(모든 url에 적용되도록 설정하였다)

<!-- sitemesh -->

 <filter>

  <filter-name>sitemesh</filter-name>

  <filter-class>

   com.opensymphony.module.sitemesh.filter.PageFilter

  </filter-class>

 </filter>

 <filter-mapping>

  <filter-name>sitemesh</filter-name>

  <url-pattern>/*</url-pattern>

 </filter-mapping>

 <!-- // sitemesh -->


3.레이아웃 설정파일 추가 

WEB-INF 하위에 sitemesh.xml과 decorators.xml 을 추가.


4. sitemesh.xml 

샘플소스에 있는 sitemesh.xml을 그대로 적용.


<?xml version="1.0" encoding="UTF-8"?>

<sitemesh>

<!--decorator 결정 -->

<property name="decorators-file" value="/WEB-INF/decorators.xml" />

<excludes file="${decorators-file}" />


<!--parser를 설정:해당 페이지의 content-type에 따라 데코레이터 결정 -->

<page-parsers>

<parser content-type="text/html"

class="com.opensymphony.module.sitemesh.parser.HTMLPageParser" />

<parser content-type="text/html;charset=UTF-8"

class="com.opensymphony.module.sitemesh.parser.HTMLPageParser" />

</page-parsers>


<decorator-mappers>

<mapper

class="com.opensymphony.module.sitemesh.mapper.PrintableDecoratorMapper">

<param name="decorator" value="printable" />

<param name="parameter.name" value="printable" />

<param name="parameter.value" value="true" />

</mapper>


<mapper class="com.opensymphony.module.sitemesh.mapper.PageDecoratorMapper">

<param name="property" value="meta.decorator" />

</mapper>


<!-- mapper결정 : 설정파일 사용하여 decorator정하기 -->

<mapper

class="com.opensymphony.module.sitemesh.mapper.ConfigDecoratorMapper">

<param name="config" value="${decorators-file}" />

</mapper>

</decorator-mappers>

</sitemesh>


5. decorators.xml

header, footer 추가.


<?xml version="1.0" encoding="UTF-8"?>

 <!-- Default Diretory 설정 footer, header 등 jsp파일 위치 -->

 <decorators defaultdir="/WEB-INF/views/decorators">

 <decorator name="_sidebar" page="sidebar.jsp" />

 <decorator name="_header" page="header.jsp" />

 <decorator name="_footer" page="footer.jsp" /> 

</decorators>


6. 적용 예제

<body>

<div id="wrap">

 <div id="header">

       <page:applyDecorator name="_header" />

 </div><hr /><!--end header-->

 <div id="body">

  <div id="sidebar">

   <page:applyDecorator name="_sidebar" />

  </div>

   <decorator:title />

  <decorator:body />

 </div><!-- end body -->

 <div id="footer">

  <page:applyDecorator name="_footer" />

 </div><!-- end footer -->

</div><!-- end wrap -->

</body>


decorators.xml에서 설정한 _header, _sidebar, _footer 파일 내용이 페이지의 지정된 위치에 삽입된다.




'JAVA > Spring' 카테고리의 다른 글

[Spring] Eclipse 설치 및 Spring Boot 설정  (0) 2019.04.15
스프링 모듈 목록  (0) 2019.03.21
Eclipse에서 Spring Project 설정 (Maven)  (0) 2019.03.21
** 스프링 모듈 목록

모듈명

 설명

 core

DI 기능을 비롯한 프레임워크의 기반을 제공한다. 

 beans

BeanFactory 인터페이스를 통해 구현된다.

 expression

객체에 접근하고 객체를 조작하기 위한 표현 언어를 제공한다. JSP 2.1규약에 명시된 통합 EL을 확장하였다

 context

spring-core와 spring-beans 모듈을 확장해서 국제화, 이벤트 처리, 리소스 로딩, 서블릿 컨테이너를 위한 컨텍스트 생성 등의 기능을 추가로 제공한다. Application Context 인터페이스를 통해 구현된다. 

 context.support

Ehcache, 메일, 스케줄링, UI의 Velocity 지원 기능을 제공한다. 

 aop

AOP Alliance에 호환되는 AOP구현을 제공한다.

 aspects

AspectJ와의 통합을 제공한다. 

 web

파일 업로드, Locale 처리 등 웹을 위한 통합 기능을 제공한다.

또한 원격 지원 기능중 웹 관련 기능을 제공한다. 

 web.servlet

스프링 MVC를 제공한다. JSP, Velocity에 대한 뷰 연동을 지원한다. 

 web.struts

스프링과 스트러츠 연동 기능을 제공한다. 

 web.portlet

포틀릿 환경에서 사용하는 MVC 구현을 제공한다. 

 transaction

AOP를 이용한 선언적 트랜잭션 관리 및 코드를 이용한 트랜잭션 관리 기능을 제공한다. 

 jdbc

JDBC 프로그래밍을 위한 추상 레이어를 제공한다. JDBC 템플릿을 제공함으로써 

간결한 코드로 JDBC 프로그래밍을 할 수 있게 돕는다.

 orm

하이버네이트, JPA, iBatis, JDO 등 ORM API를 위한 통합 레이어를 제공한다.

스프링이 제공하는 트랜잭션 관리와의 연동을 지원한다. 

 oxm

객체와 XML 사이의 매핑을 처리하기 위한 추상 레이어를 제공한다.

JAXB, Castor, XMLBeans, JiBX, XStream과의 연동을 지원한다. 

 jms

JMS의 메시지를 생성하고 수신하는 기능을 제공한다. 

 test

JUnit이나 TestNG를 이용한 스프링 컴포넌트의 테스트를 지원한다.

 instrument

Instrumentation 지원 클래스를 제공한다.

 instrument.tomcat

톰캣 서버를 위한 Instrumentation 지원 클래스를 제공한다. 

 asm

ASM 라이브러리를 재패키징 한 모듈 

 



 

출처 

최범균 : Spring 3.0 프로그래밍

출처 토비의 스프링 프레임워크 3.1 부록 A

스프링 모듈 목록스프링 모듈 목록스프링 모듈 목록스프링 모듈 목록스프링 모듈 목록스프링 모듈 목록

'JAVA > Spring' 카테고리의 다른 글

[Spring] Eclipse 설치 및 Spring Boot 설정  (0) 2019.04.15
[Spring] SiteMesh 설정 방법  (0) 2019.03.27
Eclipse에서 Spring Project 설정 (Maven)  (0) 2019.03.21

1. File-New-Other-Dynamic Web Project 생성



2. Project에서 우클릭 - Configure - Convert to Maven Project



3. Resource Directory 생성



4. Spring 라이브러리 pom.xml 파일에 설정






'JAVA > Spring' 카테고리의 다른 글

[Spring] Eclipse 설치 및 Spring Boot 설정  (0) 2019.04.15
[Spring] SiteMesh 설정 방법  (0) 2019.03.27
스프링 모듈 목록  (0) 2019.03.21

+ Recent posts