2016-10-22 13 views
-1

現在、SpringとHibernateでMavenマルチモジュールプロジェクトを作成しています。私はspring-dispature.xmlをどこに置いてBeanの設定にアクセスする必要があるのか​​混乱しています。現在、[core-web][core-service(request mapping)][core-bal(bal layer)][core-dal(implementation layer)][core-model(data access layer)]があります。MavenマルチモジュールプロジェクトでSpring Hibernate設定

core-balに入れました。

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

<!--Scan Merchandising Rest Services for Beans Defined In this Context --> 
<context:component-scan base-package="com.hrcs.bal.userProfile.impl"> 
</context:component-scan> 

<bean id="loginDal" class="com.hrcs.dal.userProfile.impl.LoginDalImpl" /> 

今、どこで見るリゾルバを配置する必要がありますでしょうか?

答えて

-1

あなたはここに春のマルチモジュールプロジェクトの例を持っているhttps://github.com/DISID/disid-proofs/tree/master/spring-boot-multimodule

(あなたは春のブートを使用していない場合は心配しないでください...同じ考えですが、提供自動構成なし)

あなたは戦争パッケージングを備えた "アプリケーション"/"ウェブ"モジュールを持っていることに注意してください。他のすべてのモジュールは.jarパッケージでなければなりません。

このモジュールは、.jarパッケージ化された残りのモジュールとの依存性を持つデプロイ可能なモジュールになります。 (service-api、service-implなど)

すべての@Configurationクラス、.xml設定ファイル、スプリングブートスターター(必要な場合)、application.propertiesなどは、.warモジュールに含める必要があります。

よろしくお願いします。

関連する問題