<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                ~~~ parent是所有工程的父工程 管理jar文件版本和插件版本 common工具類 manager后臺管理的聚合工程 -pojo interface dao service web是manager的模塊 ~~~ ## 5.1.Maven(項目構建工具) 使用maven管理工程 1、jar文件管理 2、工程之間的相互引用 3、自動打包構建項目 ## 5.2.后臺工程搭建分析 1、maven的打包方式:jar、war、pom 2、父工程:pom,管理jar包的版本,管理插件的版本,統一管理依賴關系。 3、聚合工程:pom。 4、項目結構 buy-parent:父工程,打包方式pom,管理jar包的版本號。 ????| ??????????項目中所有工程都應該繼承父工程。 |--buy-common:通用的工具類通用的pojo(實體類)。打包方式jar |--buy-manager:服務層工程。聚合工程。Pom工程 |--buy-manager-dao:打包方式jar |--buy-manager-pojo:打包方式jar |--buy-manager-interface:打包方式jar |--buy-manager-service:打包方式:jar ????|--buy-manager-web:表現層工程。打包方式war 5.3.工程搭建 5.3.1. buy-parent 1、 工程類型:POM 2、 開發環境: a) eclipse mars2 b) maven:3.3.9 c) 本地倉庫:默認位置在~/.m2/repository 注:使用老師提供的倉庫,提高效率。 直接覆蓋你的 m2 5.3.工程搭建 5.3.1. buy-parent 1、 工程類型:POM 2、 開發環境: a) eclipse mars2 b) maven:3.3.9 c) 本地倉庫:默認位置在~/.m2/repository 注:使用老師提供的倉庫,提高效率。 直接覆蓋你的 m2 5.3.工程搭建 5.3.1. buy-parent 1、 工程類型:POM 2、 開發環境: a) eclipse mars2 b) maven:3.3.9 c) 本地倉庫:默認位置在~/.m2/repository 注:使用老師提供的倉庫,提高效率。 直接覆蓋你的 m2 Buy-parent 中的 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.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.igeek </groupId> <artifactId>buy-parent</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>pom</packaging> <!-- 集中定義依賴版本號 --> <properties> <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.spring.version> <mybatis.paginator.version>1.2.15</mybatis.paginator.version> <mysql.version>5.1.32</mysql.version> <slf4j.version>1.6.4</slf4j.version> <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.version>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</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.version>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> <dependencyManagement> <dependencies> <!-- 時間操作組件 --> <dependency> <groupId>joda-time</groupId> <artifactId>joda-time</artifactId> <version>${joda-time.version}</version> </dependency> <!-- Apache工具組件 --> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>${commons-lang3.version}</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-io</artifactId> <version>${commons-io.version}</version> </dependency> <dependency> <groupId>commons-net</groupId> <artifactId>commons-net</artifactId> <version>${commons-net.version}</version> </dependency> <!-- Jackson Json處理工具包 --> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>${jackson.version}</version> </dependency> <!-- httpclient --> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> <version>${httpclient.version}</version> </dependency> <!-- quartz任務調度框架 --> <dependency> <groupId>org.quartz-scheduler</groupId> <artifactId>quartz</artifactId> <version>${quartz.version}</version> </dependency> <!-- 單元測試 --> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>${junit.version}</version> <scope>test</scope> </dependency> <!-- 日志處理 --> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> <version>${slf4j.version}</version> </dependency> <!-- Mybatis --> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>${mybatis.version}</version> </dependency> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis-spring</artifactId> <version>${mybatis.spring.version}</version> </dependency> <dependency> <groupId>com.github.miemiedev</groupId> <artifactId>mybatis-paginator</artifactId> <version>${mybatis.paginator.version}</version> </dependency> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper</artifactId> <version>${pagehelper.version}</version> </dependency> <!-- MySql --> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>${mysql.version}</version> </dependency> <!-- 連接池 --> <dependency> <groupId>com.alibaba</groupId> <artifactId>druid</artifactId> <version>${druid.version}</version> </dependency> <!-- Spring --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-aspects</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jms</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context-support</artifactId> <version>${spring.version}</version> </dependency> <!-- JSP相關 --> <dependency> <groupId>jstl</groupId> <artifactId>jstl</artifactId> <version>${jstl.version}</version> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>${servlet-api.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>jsp-api</artifactId> <version>${jsp-api.version}</version> <scope>provided</scope> </dependency> <!-- 文件上傳組件 --> <dependency> <groupId>commons-fileupload</groupId> <artifactId>commons-fileupload</artifactId> <version>${commons-fileupload.version}</version> </dependency> <!-- Redis客戶端 --> <dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId> <version>${jedis.version}</version> </dependency> <!-- solr客戶端 --> <dependency> <groupId>org.apache.solr</groupId> <artifactId>solr-solrj</artifactId> <version>${solrj.version}</version> </dependency> <!-- dubbo相關 --> <dependency> <groupId>com.alibaba</groupId> <artifactId>dubbo</artifactId> <version>${dubbo.version}</version> </dependency> <dependency> <groupId>org.apache.zookeeper</groupId> <artifactId>zookeeper</artifactId> <version>${zookeeper.version}</version> </dependency> <dependency> <groupId>com.github.sgroschupf</groupId> <artifactId>zkclient</artifactId> <version>${zkclient.version}</version> </dependency> <dependency> <groupId>org.apache.activemq</groupId> <artifactId>activemq-all</artifactId> <version>${activemq.version}</version> </dependency> <dependency> <groupId>org.freemarker</groupId> <artifactId>freemarker</artifactId> <version>${freemarker.version}</version> </dependency> </dependencies> </dependencyManagement> <build> <finalName>${project.artifactId}</finalName> <plugins> <!-- 資源文件拷貝插件 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>2.7</version> <configuration> <encoding>UTF-8</encoding> </configuration> </plugin> <!-- java編譯插件 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.2</version> <configuration> <source>1.7</source> <target>1.7</target> <encoding>UTF-8</encoding> </configuration> </plugin> </plugins> <pluginManagement> <plugins> <!-- 配置Tomcat插件 --> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.2</version> </plugin> </plugins> </pluginManagement> </build> </project> ~~~ 5.3.2. Buy-common 通用工具類、通用的 pojo。 打包方式為 jar,需要繼承 buy-parent。 創建 maven 工程: ![](https://box.kancloud.cn/4a5544d2d8bef96dfbc02ab157217ce0_650x586.png) Buy-common 中的 POM 文件 : ~~~ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>com.igeek</groupId> <artifactId>buy-parent</artifactId> <version>0.0.1-SNAPSHOT</version> </parent> <artifactId>buy-common</artifactId> <dependencies> <!-- 時間操作組件 --> <dependency> <groupId>joda-time</groupId> <artifactId>joda-time</artifactId> </dependency> <!-- Apache工具組件 --> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-io</artifactId> </dependency> <dependency> <groupId>commons-net</groupId> <artifactId>commons-net</artifactId> </dependency> <!-- Jackson Json處理工具包 --> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> </dependency> <!-- httpclient --> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> </dependency> <!-- quartz任務調度框架 --> <dependency> <groupId>org.quartz-scheduler</groupId> <artifactId>quartz</artifactId> </dependency> <!-- 單元測試 --> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> </dependency> <!-- 日志處理 --> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> </dependency> </dependencies> </project> ~~~ 5.3.3. Buy-manager 聚合工程。打包方式為 pom ![](https://box.kancloud.cn/20cb369015361b54171828b9c150c8a3_650x586.png) Buy-manager 中的 pom 文件 ~~~ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>com.igeek.egobuy</groupId> <artifactId>buy-parent</artifactId> <version>0.0.1-SNAPSHOT</version> </parent> <artifactId>buy-manager</artifactId> <packaging>pom</packaging> <dependencies> <dependency> <groupId>com.igeek</groupId> <artifactId>buy-common</artifactId> <version>0.0.1-SNAPSHOT</version> </dependency> </dependencies> </project> ~~~ 5.3.4. Buy-manager-pojo 是一個 maven 模塊。打包方式為 jar。 ![](https://box.kancloud.cn/5122839d6cfda3cde3cb3af382d620e2_525x500.png) ![](https://box.kancloud.cn/bcb74207395dd77979a24339012cf26b_650x584.png) ![](https://box.kancloud.cn/bccdd36e2b4ffc6aea70fd5cd282efef_1001x403.png) Buy-manager-pojo 中的 pom 文件 ~~~ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>com.igeek.egobuy</groupId> <artifactId>buy-manager</artifactId> <version>0.0.1-SNAPSHOT</version> </parent> <artifactId>buy-manager-pojo</artifactId> </project> ~~~ 5.3.5. Buy-manager-dao Maven 模塊,打包方式為 jar ![](https://box.kancloud.cn/ec63664600400e8eb211ff3c746465c7_525x500.png) ![](https://box.kancloud.cn/0dd7553e058a5ac68db3c25e684559f4_650x584.png) Buy-manager-dao 中的 pom 文件 ~~~ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>com.igeek</groupId> <artifactId>buy-manager</artifactId> <version>0.0.1-SNAPSHOT</version> </parent> <artifactId>buy-manager-dao</artifactId> <dependencies> <!-- 依賴pojo --> <dependency> <groupId>com.igeek</groupId> <artifactId>buy-manager-pojo</artifactId> <version>0.0.1-SNAPSHOT</version> </dependency> <!-- Mybatis --> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> </dependency> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis-spring</artifactId> </dependency> <dependency> <groupId>com.github.miemiedev</groupId> <artifactId>mybatis-paginator</artifactId> </dependency> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper</artifactId> </dependency> <!-- MySql --> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> </dependency> <!-- 連接池 --> <dependency> <groupId>com.alibaba</groupId> <artifactId>druid</artifactId> </dependency> </dependencies> </project> ~~~ 5.3.6. Buy-manager-interface Maven 模塊,打包方式為 jar ![](https://box.kancloud.cn/5efcd9225936698c7224135085b8a6b9_650x584.png) ![](https://box.kancloud.cn/3f2a2806f26f2f0f1eaaa78971e8378d_650x584.png) Buy-manager-interface 中的 pom 文件 ~~~ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>com.igeek</groupId> <artifactId>buy-manager</artifactId> <version>0.0.1-SNAPSHOT</version> </parent> <artifactId>buy-manager-interface</artifactId> <dependencies> <!-- 依賴pojo --> <dependency> <groupId>com.igeek</groupId> <artifactId>buy-manager-pojo</artifactId> <version>0.0.1-SNAPSHOT</version> </dependency> </dependencies> </project> ~~~ 5.3.7. Buy-manager-service Maven 模塊,打包方式為 jar ![](https://box.kancloud.cn/bc949266c10d9230a81505768a757db5_650x584.png) ![](https://box.kancloud.cn/d404518d0b27b6735fc380d05688be81_650x584.png) Buy-manager-service 中的 pom 文件 ~~~ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>com.igeek.egobuy</groupId> <artifactId>buy-manager</artifactId> <version>0.0.1-SNAPSHOT</version> </parent> <artifactId>buy-manager-service</artifactId> <dependencies> <!-- 依賴DAO --> <dependency> <groupId>com.igeek.egobuy</groupId> <artifactId>buy-manager-dao</artifactId> <version>0.0.1-SNAPSHOT</version> </dependency> <!-- 依賴interface --> <dependency> <groupId>com.igeek</groupId> <artifactId>buy-manager-interface</artifactId> <version>0.0.1-SNAPSHOT</version> </dependency> <!-- Spring --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-aspects</artifactId> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jms</artifactId> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context-support</artifactId> </dependency> </dependencies> </project> ~~~ 5.3.8. Buy-manager-web Maven 模塊,打包方式為 war ![](https://box.kancloud.cn/10d4b590b32465ec3e0001e916831f0d_650x584.png) ![](https://box.kancloud.cn/d038fa3bf1a1284526e45cd6c8cb999c_650x584.png) 由于打包方式為 war 需要補全目錄結構,需要在 webapp 目錄下添加 WEB-INF 目錄,和web.xml 文件。 ![](https://box.kancloud.cn/adffd38f3dcb24330688db8bdf4dce4f_488x457.png) ![](https://box.kancloud.cn/10c6d9858a953aac73e7f864e6e17f2c_1071x522.png) ![](https://box.kancloud.cn/50b059ad76bd3f0d7662864390283c2d_779x81.png) ![](https://box.kancloud.cn/12823df4daeac895d6d1423e0316c28e_514x427.png) Buy-manager-web 中的 pom文件 ~~~ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>com.igeek.egobuy</groupId> <artifactId>buy-manager</artifactId> <version>0.0.1-SNAPSHOT</version> </parent> <artifactId>buy-manager-web</artifactId> <packaging>war</packaging> <dependencies> <!-- 依賴service --> <dependency> <groupId>com.igeek.egobuy</groupId> <artifactId>buy-manager-service</artifactId> <version>0.0.1-SNAPSHOT</version> </dependency> <dependency> <groupId>com.igeek.egobuy</groupId> <artifactId>buy-manager-interface</artifactId> <version>0.0.1-SNAPSHOT</version> </dependency> <!-- JSP相關 --> <dependency> <groupId>jstl</groupId> <artifactId>jstl</artifactId> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <scope>provided</scope> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>jsp-api</artifactId> <scope>provided</scope> </dependency> <!-- 文件上傳組件 --> <dependency> <groupId>commons-fileupload</groupId> <artifactId>commons-fileupload</artifactId> </dependency> </dependencies> </project> ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看