Spring MVC は初めてですが、Spring MVC と resteasy を使用して Web サービスを作成しました。私のコントローラーは正常に動作しており、テストケースを作成する必要がありますが、書き込みを試みましたが、オートワイヤリングで問題が発生することはありませんでした。
@コントローラ
@Path("/searchapi") public class SearchAPIController は ISearchAPIController を実装します { @Autowired プライベート ISearchAPIService srchapiservice; @得る @Path("/{ドメイン}/{グループ}/検索") @Produces({"アプリケーション/xml", "アプリケーション/json"}) public Collections getSolrData( @PathParam("domain") final 文字列ドメイン、 @PathParam("group") 最終文字列グループ、 @Context final UriInfo uriinfo) throws Exception { System.out.println("LANDED IN get****************"); return srchapiservice.getData(ドメイン、グループ、uriinfo); } }
spring mvc のテスト ケースのサンプル コードを教えてください。