intellij idea 15 springソースの読み取り環境を構築する

1911 ワード

intellij idea 15 springソースの読み取り環境を構築する
ソースコードの勉強
環境の準備
(1)intellij idea 15公式サイトをダウンロードして接続をダウンロードする:https://www.jetbrains.com/idea/download/ Ultimate版をダウンロードすることを提案します.このようにweb開発に対するサポートコンポーネントが多くて、開発が便利で、経済力のある提案は正規版を支持します.ないと分かります.
(2)jdk 8をダウンロードし、java環境を設定する.
(3)clone springソースのspringソースgithub住所:https://github.com/spring-projects/spring-framework ソースをダウンロードした後、ideaで開かないでください.まずソースの中のimport-into-indea.mdファイルを読んでください.ファイルの内容は以下の通りです.一歩ずつ操作すればいいです.
Step s
Within your locallly cloned spring-frameworkworkwoking directory:1.Pre- comple spring-oxm with ./gradlew cleanIdea :spring-oxm:compileTestJava 142 with spring-aspects 2.Import into IDEA(File->import projject-impouuuuddstternal model-Gradele-Gradele)3.SethethethethethethezzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzeeePrePrePrePrePrePrePrePrePrePrePrePrePrePrePrePrejecPrejs)5.Code away
Known ises
  • spring-oxm Shuld be pre-compled since it's using repackaged dependencies
  • spring-aspects does not comple out of the box due to references to aspect types unknown to IDEA.Seehttp://youtrack.jetbrains.com/issue/IDEA-64446 for details.In the meantime,the'spring-aspects'shuld be excluded from the overall project to avoid complation errors.
  • While all JUnit tests pass from the command line with Grade、manwill fail when from IDEA.Resoving this a work in progress.If atempting to run alit JUnitest from within IDEA、you will likely need to set the follwing VM options to avoid out of memory errors:-XX:MaxPermSize=2048 m-Xmx 2048 m-XX:MaxHeappSize=2048 m
  • (4)ideaでspringソースを開けて勝手にtestを書きました.運行結果は下図の通りです.
    問題:(1)ソースコードは上の導入によって、gradle buildも成功しましたが、自分でテストコードを書いても、いくつかのカバンが見つからない問題を報告するかもしれません.これはideaがspringソースを開けた後、正しい配置がないので、依存を追加すれば解決できます.それは順序に依存しているかもしれません.詳しくはこのブログを見ることができます.http://www.wurenny.com/2015/04/17/186