문제 설명
Spring 다중 모듈 프로젝트를 설정하는 방법은 무엇입니까? (How to setup a Spring multimodule project?)
저는 Spring을 처음 사용하고 3개의 하위 모듈로 분할된 프로젝트를 설정하려고 합니다. 빌드 도구로 maven을 사용하고 있습니다. 내 문제는 Springs "마법"을 추가할 위치를 모른다는 것입니다. 내 3개의 하위 모듈은 "ORM"(데이터베이스에 액세스하기 위해 모든 최대 절전 모드 직원 보유) "BusinessLogic"(완전한 논리를 보유해야 함) 및 "WebApp"(앱/로직에 유일한 "클라이언트"로 추가)입니다.
문제가 없어 보이는 WebApp에 SpringMVC를 사용하고 싶습니다. "BusinessLogic"은 완전한 논리를 보유해야 하므로 해당 모듈에 Spring 관련 항목(Bean 정의/DI)을 추가하는 것으로 생각했습니다. 하지만 웹 앱에서 모듈에 액세스할 때 Spring을 설정하는 방법을 모르겠습니다.
구멍 프로젝트는 JavaEE/JBoss 앱에서 이식되고 있습니다. 여기서 "
## 참조 솔루션 #### 방법 1:
you could configure spring context in your web.xml and you can perform import of Spring sub‑modules context. You can add import's configuration of sub‑modules in your webApp application context.