(1)、解压dropins.zip到eclipse目录下
(2)、重启Eclipse即可
在Maven管理体系中需要将依赖进行统一管理,就需要用到taotao-parent父工程进行jar包的统一管理
在开发过程中,需要将一些公用的类或者功能模块抽取出来,以达到重复使用的目的,所以需要创建taotao-common工程
(1)、创建taotao-parent工程
(2)、导入jar包坐标
4.12
4.1.3.RELEASE
3.2.7
1.2.2
1.2.15
5.1.32
1.6.4
2.4.2
1.0.9
0.8.0.RELEASE
1.2
2.5
2.0
2.5
3.3.2
1.3.2
3.3
3.7.5
2.3.4
0.9.1
1.3.1
1.9
2.7.2
4.10.3
2.5.3
3.4.7
0.1
5.12.0
2.3.23
2.2.2
junit
junit
${junit.version}
test
org.springframework
spring-webmvc
${spring.version}
org.springframework
spring-jdbc
${spring.version}
org.springframework
spring-aspects
${spring.version}
org.springframework
spring-context-support
${spring.version}
org.mybatis
mybatis
${mybatis.version}
org.mybatis
mybatis-spring
${mybatis.spring.version}
com.github.abel533
mapper
${mapper.version}
com.github.pagehelper
pagehelper
${pagehelper.version}
com.github.jsqlparser
jsqlparser
${jsqlparser.version}
mysql
mysql-connector-java
${mysql.version}
org.slf4j
slf4j-log4j12
${slf4j.version}
com.fasterxml.jackson.core
jackson-databind
${jackson.version}
com.jolbox
bonecp-spring
${jolbox.version}
jstl
jstl
${jstl.version}
javax.servlet
servlet-api
${servlet-api.version}
provided
javax.servlet
jsp-api
${jsp-api.version}
provided
joda-time
joda-time
${joda-time.version}
org.apache.commons
commons-lang3
${commons-lang3.version}
org.apache.commons
commons-io
${commons-io.version}
commons-fileupload
commons-fileupload
${commons-fileupload.version}
com.alibaba
dubbo
${dubbo.version}
org.springframework
spring
org.jboss.netty
netty
org.apache.zookeeper
zookeeper
${zookeeper.version}
com.github.sgroschupf
zkclient
${zkclient.version}
commons-codec
commons-codec
${commons-codec.version}
org.quartz-scheduler
quartz
2.2.1
org.apache.activemq
activemq-all
${activemq.version}
org.springframework
spring-jms
${spring.version}
org.freemarker
freemarker
${freemarker.version}
redis.clients
jedis
${jedis.version}
org.apache.solr
solr-solrj
${solrj.version}
${project.artifactId}
org.apache.maven.plugins
maven-resources-plugin
2.7
UTF-8
org.apache.maven.plugins
maven-compiler-plugin
3.2
1.7
UTF-8
org.apache.tomcat.maven
tomcat7-maven-plugin
2.2
src/main/java
**/*.properties
**/*.xml
false
src/main/resources
**/*.properties
**/*.xml
false
taotao-manager pom聚合工程的父工程,负责把所有子工程聚合在一起
taotao-manager-pojo jar聚合工程的子工程,javaBean
taotao-manager-mapper jar 聚合工程的子工程,DAO层
taotao-manager-interface jar 聚合工程的子工程,业务处理层的接口
taotao-manager-service war聚合工程的子工程,业务处理层
taotao-manager-controller war单独的工程,页面控制层
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://127.0.0.1:3306/taotao?useUnicode=true&characterEncoding=utf8&autoReconnect=true
jdbc.username=root
jdbc.password=root
log4j.rootLogger=DEBUG,A1
log4j.logger.com.taotao = DEBUG
log4j.logger.org.mybatis = DEBUG
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-d{yyyy-MM-dd HH:mm:ss,SSS} [%t] [%c]-[%p] %m%n
taotao-manager-service
index.html
index.htm
index.jsp
default.html
default.htm
default.jsp
contextConfigLocation
classpath:spring/applicationContext-*.xml
org.springframework.web.context.ContextLoaderListener
log4j.rootLogger=DEBUG,A1
log4j.logger.com.taotao = DEBUG
log4j.logger.org.mybatis = DEBUG
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-d{yyyy-MM-dd HH:mm:ss,SSS} [%t] [%c]-[%p] %m%n
taotao-manager-web
index.html
index.htm
index.jsp
default.html
default.htm
default.jsp
encoding
org.springframework.web.filter.CharacterEncodingFilter
encoding
UTF-8
encoding
/*
taotao-manager-web
org.springframework.web.servlet.DispatcherServlet
contextConfigLocation
classpath:spring/springmvc.xml
1
taotao-manager-web
/rest/*
package com.taotao.manager.mapper.test;
public interface TestMapper {
/**
* 从数据库获取当前时间
*/
public String queryDate();
}
package com.taotao.manager.service.test;
public interface TestService {
/**
* 查询当前数据库时间
* @return
*/
public String queryDate();
}
package com.taotao.manager.service.test.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.taotao.manager.mapper.test.TestMapper;
import com.taotao.manager.service.test.TestService;
@Service
public class TestServiceImpl implements TestService {
@Autowired
private TestMapper mapper;
/**
* 查询当前数据库时间
*/
public String queryDate() {
return mapper.queryDate();
}
}
package com.taotao.manager.controller.test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.taotao.manager.service.test.TestService;
@Controller
public class TestController {
@Autowired
private TestService service;
@RequestMapping("/queryDate.do")
@ResponseBody
public String queryDate(){
return service.queryDate();
}
}