1分散
1.1配布されるもの
1.2分散型とクラスターの違い
小さなレストランには、野菜を切ったり、野菜を洗ったり、材料を準備したり、炒めたりするシェフは1人しかいません。その後、より多くの顧客がいて、キッチンにシェフが忙しすぎたので、彼は別のシェフを雇いました。両方のシェフは同じ料理を調理できます。これら2人のシェフの関係はクラスターでした。シェフが料理に集中し、最高の料理をするために、彼は野菜を切って、料理の準備、材料の準備を担当するためにサイドディッシュを雇いました。シェフとサイドディッシュの関係は配布されており、片側の料理が忙しすぎるため、彼はサイドディッシュを雇い、両側の料理の関係はクラスターです。
2。分散プロジェクトを構築します
準備ツール:Eclipse、vmwarm fided centos7システム、Zookeeper ....最も重要なことは3歳の高齢者マシンです。
1最初に親クラスのMavenプロジェクトを作成し、パッケージング方法はPOMです。
Eclipseで親クラスMavenプロジェクトを作成すると、パッケージング方法がPOMです。なぜ親クラスのMavenプロジェクトを作成するのですか?このMavenプロジェクトを使用してさまざまなJARパッケージバージョンを管理するため、サブクラスがJARパッケージと親クラスを必要とする場合は、実行できます。 xml
<Project XMLNS = "http://maven.apache.org/pom/4.0.0" xmlns:xsi = "http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation = "http://maven.apach/4.0. http://maven.apache.org/xsd/maven-4.0.0.0.xsd "> <modelversion> 4.0.0 </modelversion> <groupid> com.itqf </groupid> <artifactid> sing-parent </artifactid> <バージョン> 0.0.1-snapshot < JARパッケージ - > <プロパティ> <junit.version> 4.12 </junit.version> <spring.version> 4.2.4.release </spring.version> <mybatis.version> 3.2.8 </mybatis.version> <mybatis.spring.version> 1.2.2 < /mybatis.version> <mybatis.paginator.version> rsion> <jackson.version> 2.4.2 </jackson.version> <druid.version> 1.0.9 </druid.version> <httpclient.version> 4.3.5 </httpclient.version> <jstl.version> 1.2 </jstl .version> <servlet-api.version> 2.5 </servlet-api.version> <jsp-api.version> 2.0 </jsp-api.version> <joda-time.version> 2.5 </joda-time.version> <commons-lang3.ve rsion> 3.3.2 </commons-lang3.version> <commons-io.version> 1.3.2 </commons-io.version> <commons-net.version> 3.3 </commons-net.version> <pagehelper.version> 3.4。 2-fix </pagehelper.version> <jsqlparser.version> 0.9.1 </jsqlparser.version> <commons-fileupload.version> 1.3.1 </commons-fileupload.version> <jedis.version> 2.7 .2 </jedis.version> <solrj.version> 4.10.3 </solrj.version> <dubbo.version> 2.5.3 </dubbo.version> <zookeeper.version> 3.4.7 </zookeeper.version> <zkclient.versio n> 0.1 </zkclient.version> <activemq.version> 5.11.2 </activemq.version> <freemarker.version> 2.3.23 </freemarker.version> <quartz.version> 2.2.2 </quartz.version> </properties> <! - すべてのプロジェクトで使用されるJARパッケージ、実際の依存関係なしに - > <依存管理> <依存関係> <! - タイム操作コンポーネント - > <依存> <groupid> joda-time </groupId>
2 Maven集合プロジェクトを作成します。
2.1 Maven Aggregation Projectを作成し、親プロジェクトを継承します。
集約エンジニアリング:プロジェクト内のコントローラーレイヤー、ビューレイヤーなど。プロジェクトに独立して形成され、最終的にプロジェクトが最終的に実行されるとプロジェクトに統合できます。
pom.xml
<Project XMLNS = "http://maven.apache.org/pom/4.0.0" xmlns:xsi = "http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation = "http://maven.apach/4.0. http://maven.apache.org/xsd/maven-4.0.0.0.xsd "> <modelversion> 4.0.0 </modelversion> <parent> <groupid> com.itqf </groupid> <artifactid> sing-parent </artifactid> <バージョン<GroupId> com.itqf </groupid> <artifactid> sing-manager </artifactid> <バージョン> 0.0.1-snapshot </version> <packaging> pom </packaging> <dependencies> <shiplencys> <groupId> com.itqf </groupid> <artifactid> sing-common </artifactid> </artifactid> </dependencies> <burtion> <plugins> <plugin> <groupid> org.apache.tomcat.maven </groupid> <artifactid> tomcat7-maven-plugin </artifactid> <port> 8083 </port> <path>/</path> </confyuraturation> </flubin> <モジュール> Sing-Manager-Pojo </module> <odule> sing-manager-interface </module> <module> sing-manager-service </module> <odule> <module> sing-manager-mapper> </modules> </project>
2.2集約プロジェクトでMavenモジュールを作成し、Sping-Manager-Pojo(エンティティクラスレイヤー)に名前を付けます。
Pojoは通常のJAR形式であり、親プロジェクトに依存する必要はありません。
pom.xml
<Project XMLNS = "http://maven.apache.org/pom/4.0.0" xmlns:xsi = "http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation = "http://maven.apach/4.0. http://maven.apache.org/xsd/maven-4.0.0.0.xsd "> <modelversion> 4.0.0 </modelversion> <parent> <groupid> com.itqf </groupid> <artifactid> sing-manager </artifactid> <バージョン<artifactid> sing-manager-pojo </artifactid> </project>
2.3集約プロジェクトでMavenモジュールを作成し、Spring-Manager-Mapper(DAOレイヤー)に名前を付けます。 pom.xmlファイルのPojoに依存しています。マッパーレイヤーメソッドはエンティティクラスオブジェクトを返すため、POJOを使用する必要があります。
依存関係JARパッケージをインポートします。
xml
<Project XMLNS = "http://maven.apache.org/pom/4.0.0" xmlns:xsi = "http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation = "http://maven.apach/4.0. http://maven.apache.org/xsd/maven-4.0.0.0.xsd "> <modelversion> 4.0.0 </modelversion> <parent> <groupid> com.itqf </groupid> <artifactid> sing-manager </artifactid> <バージョン<artifactid> sing-manager-mapper </artifactid> <! - 依存関係pojo-> <依存関係> <依存関係> <groupid> com.itqf </groupid> <artifactid> sing-manager-pojo </artifactid> <バージョン> 0.0.1-snapshot </version - > <依存関係> groupId> org.mybatis </groupid> <artifactid> mybatis </artifactid> <version> $ {mybatis.version} </version> </dependency> <deplence> < GroupId> org.mybatis </groupid> <artifactid> mybatis-spring </artifactid> <version> $ {mybatis.spring.version} </version> </dependency> <dependency> <gro upid> com.github.miemiedev </groupid> <artifactid> mybatis-paginator </artifactid> <version> $ {mybatis.paginator.version} </version> </dependency> <de Pendency> <groupId> com.github.pagehelper </groupid> <artifactid> pagehelper </artifactid> <version> $ {pagehelper.version} </version> </dependency> <! - mysql - > <dependency> groupid> mysql </groupid> <artifactid> mysql-connector-java </artifactid> <バージョン> $ {mysql.version} </version> </dependency> <! - connectionプール - > <依存関係> <groupId> com.alibaba </groupid> <artifactid> druid </artifactid> <version> $ {druid.version} </version> </dependency> </dependencies> </project> 2.4集約プロジェクトでSpring-Manager-Interface(インターフェイス)を作成し、すべてのサービスインターフェイスを独立したプロジェクトに配置します。インターフェイス内のメソッドの返品値がエンティティクラスである場合、POJOが必要です。したがって、POMのPojo xmlに依存します。
<Project XMLNS = "http://maven.apache.org/pom/4.0.0" xmlns:xsi = "http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation = "http://maven.apach/4.0. http://maven.apache.org/xsd/maven-4.0.0.0.xsd "> <modelversion> 4.0.0 </modelversion> <parent> <groupid> com.itqf </groupid> <artifactid> sing-manager </artifactid> <バージョン<artifactid> sing-manager-interface </artifactid> <dependencies> <dependency> <groupId> com.itqf </groupid> <artifactid> sing-manager-pojo </artifactid> <バージョン
2.5集約プロジェクトでSpring-Manager-Service(インターフェイス実装クラス)を作成します。包装方法は戦争です
コントローラーレイヤーはサービスレイヤーから分離されているため、実行および起動時にコントローラーとサービスをTomcatを使用して個別に公開する必要があり、集約プロジェクトに必要なすべての構成ファイルがサービスに配置されるため、すべての構成ファイルが開始時にすべての構成ファイルがロードされ、統合されます。
構成ファイル
SqlMapConfig.xml
<?xml version = "1.0" encoding = "utf-8"?> <!doctype configurationpublic " - // mybatis.org//dtd config 3.0 // en" "http://mybatis.org/dtd/mybatis-3-config.dtd"
db.properties
db.driver = com.mysql.jdbc.driverdb.url = jdbc:mysql:// localhost:3306/taotao?charaterecoding = utf-8db.username = rootdb.password = root
applicationContext-tx.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:p = "http://www.springframework.org/schema/p" xmlns:context = "http://www.springframework.org/s chema/context "xmlns:mvc =" http://www.springframework.org/schema/mvc "xmlns:tx =" http://www.springfr amework.org/schema/tx"xmlns:aop="http://www.springframework.org/schema/aop"xmlns:dubbo="http://c ode.alibabatech.com/schema/dubbo"xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.2.xsd http://www.springframework.org/schema/ap http://www.springframework.org/schema/aop/spring-aop-4.2.xsd http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xcsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd "> <bean id =" txmanager "> <property"> </fien "> </fired" <TX:Advies ID = "Advidid" Transaction-Manager = "txmanager"> <tx:属性> <tx:method name = "add*" propagation = "/> <tx:method name =" save*"propagation ="/> <tx:tx:method name = "" propagation = ""/>> <tx: "incers =" "/>> <tx:" propagation = "propagation =" "/>> <tx:" propagation = "propagation =" <tx:method name = "update*" propagation = "required"/> <tx:method name = "del*" propagation = "requent"/> <tx:method name = "find*" propagation = "supports" read-only = "true"/> <tx:method name = "get*" propagation = "readly ="/tx:< <AOP:Advisor Advice-Ref = "Advidid" PointCut = "execution(*com.itqf.service ..*。*(..)"/> </aop:config> </beans>
applicationContext-dao.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:p = "http://www.springframework.org/schema/p" xmlns:context = "http://www.springframework.org/schema/context" xmlns:mvc = "http://ww.springfr amework.org/schema/mvc"xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd "> <コンテキスト:プロパティプレイスホルダーlocation =" classpath:resource/*。プロパティ "/> <bean id =" datasource "> <propettion name =" driverclass "" name = "url" value = "$ {db.url}"> </property> <property name = "username" value = "$ {db.username}"> </property name> <property name = "property name" value = "$ {db.password}"> </property> <property name = "maxactive" "min <min <min <min <min <min <min <値= "5"> </property> </bean> <bean> <プロパティ名= "dataSource" ref = "dataSource"> </property> <hame = "configlocation" value = "classpath:classpath:classpath.xml"> </パイプロパティ> </bean> < </bean> </bean> applicationContext-service.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:p = "http://www.springframework.org/schema/p" xmlns:context = "http://www.springframework.org/schema/context" xmlns:mvc = "http://ww.springfr amework.org/schema/mvc"xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd "> <context:component-scanベースパッケージ=" com.itqf.service "> </context:component-scan> </beans>
pom.xml
<Project XMLNS = "http://maven.apache.org/pom/4.0.0" xmlns:xsi = "http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation = "http://maven.apach/4.0. http://maven.apache.org/xsd/maven-4.0.0.0.xsd "> <modelversion> 4.0.0 </modelversion> <parent> <parrent> <parter> <proupid> <artifactid> sing-manager </artifactid> <バージョン<artifactid> sing-manager-service </artifactid> <packaging> war </packaging> <dependencies> <dependency> <shipident> com.qianfeng </groupid> <artifactid> sing-manager-interface </artifactid> <バージョン> 0.0.1-snapshot < <artifactid> sing-manager-mapper </artifactid> <バージョン> 0.0.1-snapshot </version> </dependency> <! - spring - > <依存関係> groupId> org.springframework </groupid> <artifactid> spring-context </artifactid> <version> $ {spring.version} </version> </dependency> <seplency> <ependency> <shipence> ring.version} </version> </dependency> <dependency> groupid> org.springframework </groupid> <artifactid> spring-webmvc </artifactid> <バージョン> $ {spring.version} </version> </dependency> <redency> <shipidency jdbc </artifactid> <version> $ {spring.version} </version} </dependency> <dependency> groupid> org.springframework </groupid> <artifactid> spring-aspects </artifactid> <バージョン> $ {spring.version} </version rk </groupid> <artifactid> spring-jms </artifactid> <version> $ {spring.version} </version} </dependency> <dependency> <groupid> org.springframework </groupid> <artifactid> spring-context-support </artifactid> </spring.version} </依存関係> </project>最終工学構造
3 Dubboを使用してサービスを公開します
最初に考えますか?
TaobaoやJDなどのモールのWebサイトは、PC側だけでなく、携帯電話側からもログインできます。どのように実装されていますか? 2つのコントローラーを書きますか?それは間違いなくそうではありません。あなたが何もすることがないとき、誰が何もすることはありませんか?次に、SOA(サービス指向アーキテクチャ)の使用が必要です。分散型を使用してプロジェクトを作成すると、お互いを呼び出す多くのシステムがあります。前後に電話をかけると、コード構造は非常に混乱します。ここでは、Dubboを使用して、あまりにも多くの出版サービスの問題を解決し、それについて明確ではありません。
SOAとは何ですか
SOAは複数のサービスを含む設計方法であり、サービスは最終的に協力を通じて一連の機能を提供します。通常、サービスはオペレーティングシステムプロセスで独立した形式で存在します。サービスは、インプロセスの呼び出しではなく、ネットワークを介して通信します。
たとえば、ニュースサービス(ニュースリリース、視聴、修正、削除)、注文サービス(注文の変更、注文視聴、注文削除など)金融サービス(収益、支出、統計など)従業員サービス(新しい修正、視聴、統計)
ダボ
ダボとは(リソーススケジューリングおよびガバナンスセンターの管理ツール)
インターネットの開発により、Webサイトアプリケーションの規模は継続的に拡張されており、従来の垂直アプリケーションアーキテクチャはもはやそれに対処できません。分散サービスアーキテクチャとモバイルコンピューティングアーキテクチャが不可欠です。アーキテクチャの秩序ある進化を確保するために、ガバナンスシステムが緊急に必要です。
単一のアプリケーションアーキテクチャ
垂直アプリケーションアーキテクチャ
分散サービスアーキテクチャ
フローコンピューティングアーキテクチャ
ダボ環境の構築:
ノードロール説明:
関係の説明:
ここでは、主にレジストリセンター(レジストリ)に来て、Zookeeperを使用してレジストリセンターとして機能します。
Linux環境であるZookeeperにレジストリを展開します
最初のステップはもちろん仮想マシンをオンにすることですので、CENTOS7で行います。
オンラインでZookeeper圧縮パッケージを入手してください。私のものはZookeeper-3.4.6.tar.gzです
/optディレクトリに貼り付けて、減圧します。 (JDK環境が必要です。JDK環境がない場合は、JDKを最初にインストールします)
Zookeeper-3.4.6ディレクトリを入力し、データと呼ばれるフォルダーを作成します。
Zoo_sample.cfgをzoo.cfgに./confディレクトリの名前を変更しますzoo.cfgのデータ属性を変更:datadir =/opt/zookeeper-3.4.6/data
ステップ7:
Zookeeperが開始された後、ファイアウォールをオフにする必要があることに注意してください!!!それでおしまい。
service applicationcontext-service.xmlに構成ファイルを追加して、サービスを公開する
<! - dubboを使用してサービスを公開します - > <! - サービスの位置にあるプロジェクトを示します - > <dubbo:アプリケーション名= "Sing-Manager"/> <! - レジストリアドレスはLinuxとポート番号のIPアドレスであり、Zookeeperのデフォルトポート番号は2181-> <dubbo:<dubbo = "Zookeeper" 10.198: > </dubbo:registry> <! - サービスを特定のポートポート番号に公開し、占有されていないポートを選択します - > <dubbo:protocol name = "dubbo" port = "20888"> </dubbo> <!<! - 特定のポートポート番号にサービスを公開します。 port = "20888"> </dubbo:protocol> <! - refは、スプリングコンテナによって作成されたサービスオブジェクトの名前です - > <dubbo:service interface = "com.itqf.service.itemservice" ref = "itemserviceimpl" timeout = "6000000"> </dubbo> </dubbo>
サービスPOM.xmlにパッケージをインポートします
<! - dubbo-related-> <dependency> <groupid> com.alibaba </groupid> <artifactid> dubbo </artifactid> <! - 依存関係を除外します - > <Explusions> <Explusion> <GroupId> org.springFramework </groupId> <artifactid> spring </artifactid> </exclusion> <explusion> org.jboss.netty </groupId> <artifactid> netty </artifactid> </exclusion> </explusions >/依存関係> <依存関係> <groupId> org.apache.zookeeper </groupid> <artifactid> zookeeper </artifactid> </depensency> <依存関係> com.github.sgroschupf </groupid> <artifactid> zkclient </artifactid> dependency>
4 Spring-Manager-Controllerを作成します。これは、Aggregateプロジェクトと同じレベルにあります。依存関係をインポートします。
コンソーローは、Dubboを使用して、サービスレイヤーによって公開されたサービスにアクセスする必要があります。もちろん、Tomcatサーバーを公開に使用するには、SpringMVCも必要です。
xml
<依存関係> <! - サービスインターフェイスに頼るだけです - > <依存関係> <groupid> com.qianfeng </groupid> <artifactid> sing-manager-interface </artifactid> <バージョン> 0.0.1-snapshot </version> </dependency> <! - スプリング - > <依存関係> groupId> org.springframework </groupid> <artifactid> spring-context </artifactid> <version> $ {spring.version} </version> </dependency> <seplency> <ependency> <shipence> ring.version} </version> </dependency> <dependency> groupid> org.springframework </groupid> <artifactid> spring-webmvc </artifactid> <バージョン> $ {spring.version} </version> </dependency> <redency> <shipidency jdbc </artifactid> <version> $ {spring.version} </version} </dependency> <dependency> groupid> org.springframework </groupid> <artifactid> spring-aspects </artifactid> <バージョン> $ {spring.version} </version rk </groupid> <artifactid> spring-jms </artifactid> <version> $ {spring.version} </version} </dependency> <dependency> <groupid> org.springframework </groupid> <artifactid> spring-context-support </artifactid> <{spring.version> JSP関連 - > <依存関係> <GroupId> jstl </groupid> <artifactid> jstl </artifactid> </dependency> <dependency> <expendency> javax.servlet </groupid> <artifactid> servet-api </a rtifactid> <scope> revide </scope> </dependency> <dependency> <groupid> javax.servlet </groupid> <artifactid> jsp-api </artifactid> <scope> dubbo関連 - > <依存関係> <groupid> com.alibaba </groupid> <artifactid> dubbo </artifactid> <! - 依存関係を除外します - > <Explusions> <Explusion> <GroupId> org.springFramework </groupId> <artifactid> spring </artifactid> </exclusion> <explusion> org.jboss.netty </groupId> <artifactid> netty </artifactid> </exclusion> </explusions >/依存関係> <依存関係> <groupId> org.apache.zookeeper </groupid> <artifactid> zookeeper </artifactid> </depensency> <依存関係> com.github.sgroschupf </groupid> <artifactid> zkclient </artifactid> dependency> <build> <Plugins> <Plugin> <GroupId> org.apache.tomcat.maven </groupid> <artifactid> tomcat7-maven-plugin </artifactid> <configuration> <port> </port> <path>/</path> </configuration> </プラグインspingmvc.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:p = "http://www.springframework.org/schema/p" xmlns:context = "http://www.springframework.org/s chema/context "xmlns:mvc =" http://www.springframework.org/schema/mvc "xmlns:tx =" http://www.springfr amework.org/schema/tx"xmlns:aop="http://www.springframework.org/schema/aop"xmlns:dubbo="http://c ode.alibabatech.com/schema/dubbo"xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.2.xsd http://www.springframework.org/schema/ap http://www.springframework.org/schema/aop/spring-aop-4.2.xsd http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xcsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd "> <コンテキスト:コンポーネント---scanベースパッケージ=" <MVC:annotation-driven> </mvc:annotation-driven> <bean> <property name = "prefix" value = "/web-inf/jsp/"> </property name> <property name = "suffix" value = "。JSP"> </property> </bean> <! - プロジェクトの指定 - > < center-> <dubbo:registry protocol = "zookeeper" address = "10.0.117.198:2181"> </dubbo:registry> <! - serviceの呼び出し - > <dubbo:com.itqf.service.itemservice "id =" "Idervice"> </dubbo:> </beans> </beans
構造図:
5スプリングコモンを作成します
これは、私が特にツールを配置するために使用する必要がある場所であり、いくつかの公共のニーズを配置するために使用されます。 pom.xml
<Project XMLNS = "http://maven.apache.org/pom/4.0.0" xmlns:xsi = "http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation = "http://maven.apach/4.0. http://maven.apache.org/xsd/maven-4.0.0.0.xsd "> <modelversion> 4.0.0 </modelversion> <parent> <groupid> com.itqf </groupid> <artifactid> sing-parent </artifactid> <バージョン<groupId> com.itqf </groupId> <artifactid> sing-common </artifactid> <バージョン> 0.0.1-snapshot </version> <dependencies> <! - 時間操作コンポーネント - > <依存関係> <groupId> joda-time </groupid> <artifactid> joda-time </artifactid> <version> $ {joda-time.version} </version> </dependency> <! - apacheツールコンポーネント - > <依存関係> groupid> org.apache.commons </groupid> <artifactid> commons-lang3 </artifactid> <version> $ {commons-lang3.version} </version> </dependency> <deplency> <groupid> org.apache.commons </groupid> <artifact id> commons-io </artifactid> <version> $ {commons-io.version} </version> </dependency> <seplency> <ship groupid> commons-net </groupid> <artifactid> commons-net </artifactid> <バージョン> $ {commons-net.version} </version Toolkit - > <依存関係> <groupId> com.fasterxml.jackson.core </groupid> <artifactid> jackson-databind </artifactid> <version> $ {jackson.version} </version> </dependency> </dependencies> </project>6テスト
さて、この擬似分散プロジェクトが構築されました。次の重要なポイントは、親プロジェクト、春のマネージャーの集約プロジェクト、および春のコミュニティを地元の倉庫に設置する必要があることです。それ以外の場合、プロジェクトを開始するとエラーが報告され、親プロジェクトやその他のプロジェクトが見つかりません。
最終図面:
要約:
数時間の努力の後、私はついにそれを作りました。疲れて爆発する老人。間違いや欠点がある場合は、喜んでそうしてください。
上記はこの記事のすべての内容です。みんなの学習に役立つことを願っています。誰もがwulin.comをもっとサポートすることを願っています。