Spring 프로필 헤더 xmls 분석

"http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:aop="http://www.springframework.org/schema/aop"
       xmlns:tx="http://www.springframework.org/schema/tx" 
    xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc"     xmlns:task="http://www.springframework.org/schema/task" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.1.xsd">
  • 먼저 가장 기본 적 인 머리 네 임 스페이스 정 보 를 설명 하고 파일 설정 에 필요 한 부분,spring 의 근본
  • xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

    xml 파일 의 기본 네 임 스페이스 를 설명 합 니 다.다른 네 임 스페이스 를 사용 하지 않 은 모든 탭 의 기본 네 임 스페이스 를 표시 합 니 다. XML Schema 인 스 턴 스 를 설명 합 니 다.성명 후 schema Location 속성 을 사용 할 수 있 습 니 다.
    xmlns:aop="http://www.springframework.org/schema/aop"

    이것 은 spring 설정 파일 에서 op 에 사용 할 탭 입 니 다.접두사 가 op 인 네 임 스페이스 를 설명 합 니 다.뒤의 URL 은 네 임 스페이스 를 표시 하 는 주 소 는 정 보 를 찾 는 데 사용 되 지 않 습 니 다.그 유일한 역할 은 네 임 스페이스 에 유일한 이름 을 부여 하 는 것 이다.네 임 스페이스 가 요소 의 시작 탭 에 정의 되 었 을 때 같은 접 두 사 를 가 진 모든 하위 요 소 는 같은 네 임 스페이스 와 연 결 됩 니 다.그 다음 에 다른 예 를 들 어 context(구성 요소 태그 에 대한),MVC(mvc 태그 에 대한),tx(사무 태그 에 대한)는 모두 같은 뜻 이다.
    xsi:schemaLaction 부분:
    http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans-3.1.xsd

     
    위 에 설 정 된 네 임 스페이스 에 xsd 규범 파일 을 지정 하 는 것 입 니 다.그러면 아래 의 구체 적 인 설정 을 할 때 이 xsd 규범 파일 에 따라 해당 하 는 힌트 를 줄 것 입 니 다.예 를 들 어 모든 태그 가 어떻게 쓰 여 있 는 지,어떤 속성 이 있 는 지 스마트 하 게 알려 줄 수 있 습 니 다.설정 에서 오류 가 발생 하지 않도록 검사 하기 쉽 지 않 습 니 다.서 비 스 를 시작 할 때 도 xsd 규범 에 따라 설정 을 검증 합 니 다. 메모:하지만 위 xmlns 에 설 치 된 뮤 직 비디오 c,op,tx 등 은 모두 xsd 규범 파일 을 설정 해 야 합 니 다.

    좋은 웹페이지 즐겨찾기