は、@Configurable
アノテーションでマークされたクラスのコンパイル時に、new
オペレータで開始されたクラスにスプリング依存性を注入できるように構成したいと考えています。私はアプリケーションサーバーのスクリプトを実行するためのアクセス権がないので、ロードタイム織りを使用したくないので、変更することはできません。また、私はテストでこのクラスを使用できるようにしたい、私はIDEからテストケースを実行することを意味します。私はウェブと春の参照の読み込み時間についての情報とコンパイル時の織りの設定については何も知りませんでした。非スプリング管理対象クラスのDI用コンパイル時間
PS。私はあなたのクラスパスに、ばねの側面を持っていることを確認しその後
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<id>compile</id>
<configuration>
<source>${source}</source>
<target>${target}</target>
<verbose>true</verbose>
<aspectLibraries>
<aspectLibrary>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
</aspectLibrary>
</aspectLibraries>
</configuration>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>test-compile</id>
<configuration>
<source>${source}</source>
<target>${target}</target>
<verbose>false</verbose>
<aspectLibraries>
<aspectLibrary>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
</aspectLibrary>
</aspectLibraries>
</configuration>
<goals>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<dependencies>
<!-- Ensure aspectj tools version used by compiler is the same version used as dependency. Avoids warning -->
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>${aspectj.version}</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
...あなたのポンポンでこのような何かが動作するはずのmaven
EclipseまたはIntelliJなど? –
私はEclipseを使用しています。 – maks