【青橙商城-管理后台开发】2. 商品服务模块搭建

【青橙商城-管理后台开发】2. 商品服务模块搭建

1. 服务层模块-商品

  1. pom.xml

    <dependencies>
            <dependency>
                <groupId>com.qingcheng</groupId>
                <artifactId>qingcheng_interface</artifactId>
                <version>1.0‐SNAPSHOT</version>
            </dependency>
            <dependency>
                <groupId>com.qingcheng</groupId>
                <artifactId>qingcheng_common_service</artifactId>
                <version>1.0‐SNAPSHOT</version>
            </dependency>
        </dependencies>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.apache.tomcat.maven</groupId>
                    <artifactId>tomcat7‐maven‐plugin</artifactId>
                    <configuration>
                        <!‐‐ 指定端口 ‐‐>
                        <port>9001</port>
                        <!‐‐ 请求路径 ‐‐>
                        <path>/</path>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    
  2. 创建webapp/WEB-INF/web.xml

    <!DOCTYPE web-app PUBLIC
     "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
     "http://java.sun.com/dtd/web-app_2_3.dtd" >
    
    <web-app>
      <display-name>Archetype Created Web Application</display-name>
      <!-- 加载spring容器 -->
      <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath*:applicationContext*.xml</param-value>
      </context-param>
      <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
      </listener>
    </web-app>
    
  3. resources下创建dubbo.properties

    dubbo.port=20881
    dubbo.application=goods
    
  4. resources下创建db.properties

    jdbc.driver=com.mysql.jdbc.Driver
    jdbc.url=jdbc:mysql://127.0.0.1:3306/qingcheng_goods?characterEncoding=UTF8
    jdbc.username=root
    jdbc.password=123456
    
posted @ 2019-09-18 19:37  Sm1lence  阅读(911)  评论(0编辑  收藏  举报