私のプロセスクラス:
@Configurable("checkLicense")
public class CheckLicense {
String licensePath ;
@Value("${licenseKeyNotFound}")
String licenseKeyNotFound;
public boolean checkIn(String licensepath) {
System.out.println("hello "+licenseKeyNotFound);
licensePath = licensepath;
return checkIn();
}
}
私のApplicationContext.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<bean class="com.smart.applicationlicense.CheckLicense"
scope="prototype">
</bean>
</beans>
これが私のプロパティファイルです。
licenseKeyNotFound = License File Corrupted
これが私のサーブレットxmlです。
<context:property-placeholder location="conf/LicenseSettings.properties"
order="2" ignore-unresolvable="true" />
@Configurable
attributesとともに注釈を使用しましたが、プロパティ ファイルからのAutowire.BY_NAME, Autowire.BY_TYPE
変数を開始できません。
コントローラーから変数を開始できましたが、宣言されているこのクラスからは開始できませんでした。licenseKeyNotFound
@Configurable
誰かが私に欠けているものやコードの何が問題なのか教えてもらえますか?
私のコードに何か必要なものがあるかどうか教えてください。