> For the complete documentation index, see [llms.txt](https://docs.sysout.co.kr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sysout.co.kr/web/back-end/what-is-spring-framework/spring-mvc-project/root-context-xml.md).

# root-context.xml

## 파일 전체 내용 보기

```markup
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd">

    <!-- Root Context: defines shared resources visible to all other web components -->

</beans>
```

## 파일 상세 보기

### xml 헤더

xml 문서임을 명시하는 xml 헤더 코드이다. 모든 xml 문서의 첫 번째 줄에 위치한다.

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

### 기본 영역 설정

root-context.xml의 기본 설정 영역이다.

```markup
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd">

    <!-- Root Context: defines shared resources visible to all other web components -->

</beans>
```

* xmlns : 기본 XML Namespace 선언. 이 주소의 내용을 기본 태그로 사용 가능
* xmlns:xsi : XML Schema Instance 스펙 정보 선언
* xsi:schemaLocation : 실제 선언된 정보들의 위치를 알려주는 역할

즉, 이 문서에서는 위의 내용에 의해 다음과 같은 규칙이 적용된다.

> 아무런 표시 없이 태그를 사용하면 spring-beans 모듈의 내용을 사용할 수 있다.

다른 모듈이 추가로 필요할 경우 모듈 관리 탭을 이용할 수 있다.

## 설정 파일 모듈 관리

하단의 \[Namespaces] 탭을 선택한다.

![](/files/-McDOLOBgYaMLwrMduue)

필요한 모듈을 체크한다(여기서는 context 모듈 추가. 알림창은 무시)

![](/files/-McDOOayHlTOykXPWJw2)

추가된 모듈을 확인한다.

![](/files/-McDOQaQj9ckqfbZv8e7)
