实战SSM_O2O商铺_03项目结构规划及Maven配置

2021-08-17 11:04:50 浏览数 (1)

文章目录

  • 项目结构规划
  • Maven配置
  • Github地址

项目结构规划

按照功能在 com.artisan.o2o下新建几个package ,如上所示。

spring相关的配置文件放在/src/main/resources/spring

mybatis mapper放在/src/main/resources/mapper

静态资源文件存放在/src/main/webapp/resources


Maven配置

这里使用bom管理spring的版本,便于维护与升级

代码语言:javascript复制
<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/maven-v4_0_0.xsd">
	<modelVersion>4.0.0modelVersion>
	<groupId>com.artisangroupId>
	<artifactId>o2oartifactId>
	<packaging>warpackaging>
	<version>0.0.1-SNAPSHOTversion>
	<name>o2o Maven Webappname>
	<url>http://maven.apache.orgurl>
	
	<dependencies>
		
		<dependency>
			<groupId>junitgroupId>
			<artifactId>junitartifactId>
			<version>4.12version>
		dependency>

		
		
		<dependency>
			<groupId>ch.qos.logbackgroupId>
			<artifactId>logback-classicartifactId>
			<version>1.2.1version>
		dependency>

		
		<dependency>
			<groupId>mysqlgroupId>
			<artifactId>mysql-connector-javaartifactId>
			<version>5.1.37version>
			<scope>runtimescope>
		dependency>
		<dependency>
			<groupId>c3p0groupId>
			<artifactId>c3p0artifactId>
			<version>0.9.1.2version>
		dependency>

		
		<dependency>
			<groupId>org.mybatisgroupId>
			<artifactId>mybatisartifactId>
			<version>3.4.2version>
		dependency>
		<dependency>
			<groupId>org.mybatisgroupId>
			<artifactId>mybatis-springartifactId>
			<version>1.3.1version>
		dependency>

		
		<dependency>
			<groupId>taglibsgroupId>
			<artifactId>standardartifactId>
			<version>1.1.2version>
		dependency>
		<dependency>
			<groupId>jstlgroupId>
			<artifactId>jstlartifactId>
			<version>1.2version>
		dependency>
		<dependency>
			<groupId>com.fasterxml.jackson.coregroupId>
			<artifactId>jackson-databindartifactId>
			<version>2.8.7version>
		dependency>
		<dependency>
			<groupId>javax.servletgroupId>
			<artifactId>javax.servlet-apiartifactId>
			<version>3.1.0version>
		dependency>

		
		
		<dependency>
			<groupId>org.springframeworkgroupId>
			<artifactId>spring-coreartifactId>
		dependency>
		<dependency>
			<groupId>org.springframeworkgroupId>
			<artifactId>spring-beansartifactId>
		dependency>
		<dependency>
			<groupId>org.springframeworkgroupId>
			<artifactId>spring-contextartifactId>
		dependency>
		
		<dependency>
			<groupId>org.springframeworkgroupId>
			<artifactId>spring-jdbcartifactId>
		dependency>
		<dependency>
			<groupId>org.springframeworkgroupId>
			<artifactId>spring-txartifactId>
		dependency>
		
		<dependency>
			<groupId>org.springframeworkgroupId>
			<artifactId>spring-webartifactId>
		dependency>
		<dependency>
			<groupId>org.springframeworkgroupId>
			<artifactId>spring-webmvcartifactId>
		dependency>
		
		<dependency>
			<groupId>org.springframeworkgroupId>
			<artifactId>spring-testartifactId>
		dependency>

		
		<dependency>
			<groupId>redis.clientsgroupId>
			<artifactId>jedisartifactId>
			<version>2.9.0version>
		dependency>
		<dependency>
			<groupId>com.dyuproject.protostuffgroupId>
			<artifactId>protostuff-coreartifactId>
			<version>1.0.12version>
		dependency>
		<dependency>
			<groupId>com.dyuproject.protostuffgroupId>
			<artifactId>protostuff-runtimeartifactId>
			<version>1.0.12version>
		dependency>

		
		<dependency>
			<groupId>commons-collectionsgroupId>
			<artifactId>commons-collectionsartifactId>
			<version>3.2version>
		dependency>
		
		<dependency>
			<groupId>net.coobirdgroupId>
			<artifactId>thumbnailatorartifactId>
			<version>0.4.8version>
		dependency>
		
		<dependency>
			<groupId>com.github.pengglegroupId>
			<artifactId>kaptchaartifactId>
			<version>2.3.2version>
		dependency>
		
		<dependency>
			<groupId>commons-fileuploadgroupId>
			<artifactId>commons-fileuploadartifactId>
			<version>1.3.2version>
		dependency>
		
		
		<dependency>
			<groupId>net.sf.json-libgroupId>
			<artifactId>json-libartifactId>
			<version>2.4version>
			<classifier>jdk15classifier>
		dependency>
		
		<dependency>
			<groupId>com.thoughtworks.xstreamgroupId>
			<artifactId>xstreamartifactId>
			<version>1.4.9version>
		dependency>
		
		<dependency>
			<groupId>org.dom4jgroupId>
			<artifactId>dom4jartifactId>
			<version>2.0.0version>
		dependency>
		
		
		<dependency>
			<groupId>com.google.zxinggroupId>
			<artifactId>javaseartifactId>
			<version>3.3.0version>
		dependency>

	dependencies>
	
	 
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframeworkgroupId>
                <artifactId>spring-framework-bomartifactId>
                <version>4.3.9.RELEASEversion>
                <type>pomtype>
                <scope>importscope>
            dependency>
        dependencies>
    dependencyManagement>
	
	<build>
		<finalName>o2ofinalName>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.pluginsgroupId>
				<artifactId>maven-compiler-pluginartifactId>
				<version>3.7.0version>
				<configuration>
					<source>1.8source>
					<target>1.8target>
					<encoding>UTF8encoding>
				configuration>
			plugin>
		plugins>
	build>
project>

Github地址

代码地址: https://github.com/yangshangwei/o2o

0 人点赞