添加各种jar包
/usr/local/hadoop/share/hadoop/..
这几个文件夹下的jar包以及它们子目录lib下的所有jar包
将/usr/local/hadoop/etc/hadoop下的core-site.xml和hdfs-site.xml文件复制到新建工程的src下
同时新建日志文件log4j.properties
log4j.rootLogger=INFO, stdout log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - %m%n log4j.appender.logfile=org.apache.log4j.FileAppender log4j.appender.logfile.File=target/spring.log log4j.appender.logfile.layout=org.apache.log4j.PatternLayout log4j.appender.logfile.layout.ConversionPattern=%d %p [%c] - %m%n