プロジェクトで Grails 1.3.4 を使用しています。私が直面している問題は、必要な JAVA クラスのサービス フォルダーの下にある Groovy に記述したサービスを挿入できないことです。提供されたドキュメントに従いましたが、解決策に到達できませんでした。誰でも私が間違っているかもしれない場所を指摘できますか。
私のJAVAクラスは
package com.sapienter.jbilling.server.payment;
@Transactional( propagation = Propagation.REQUIRED )
public class PSB implements IPSB {
private ISqlUtils sqlUtils;
public ISqlUtils getSqlUtils() {
return sqlUtils;
}
public void setSqlUtils(ISqlUtils sqlUtils) {
System.out.println("Configuring SQL Utils Service");
LOG.debug("Configuring SQL Utils");
this.sqlUtils = sqlUtils;
}
}
My Grails サービス IS
package jbilling
import com.sapienter.jbilling.server.util.ISqlUtils
class SqlService implements ISqlUtils {
static transactional = false
@Override
void updateInvoice(Integer invoiceID) {
println "Does Come Here.."
}
def serviceMethod() {
}
}
サービスが実装するインターフェースは
package com.sapienter.jbilling.server.util;
public interface ISqlUtils {
public void updateInvoice(Integer invoiceID);
}
私の resources.xml ファイルは以下のとおりです..
<bean id="pSB" class="com.sapienter.jbilling.server.payment.PSB">
<property name="sqlUtils" ref="sqlService" />
</bean>
私は春とそのサービスについてあまり知りません。誰かが私の間違いを指摘できますか。
私がたどったリンクは
Grails-Reference-Documentationと、ここで最初のドキュメントを指す Stackoverflow に関するこの質問
ありがとう