作者:wodewodewoe | 来源:互联网 | 2023-09-13 20:25
第一步: 在pom文件中 换成
< properties> < scala.version> 2.12.12 scala.version> < maven.compiler.source> 1.8 maven.compiler.source> < maven.compiler.target> 1.8 maven.compiler.target> < encoding> UTF-8 encoding> < spark.version> 3.0.1 spark.version> properties>
< dependency> < groupId> org.scala-lang groupId> < artifactId> scala-library artifactId> < version> ${scala.version} version> dependency> < dependency> < groupId> junit groupId> < artifactId> junit artifactId> < version> 4.4 version> < scope> test scope> dependency> < dependency> < groupId> org.specs groupId> < artifactId> specs artifactId> < version> 1.2.5 version> < scope> test scope> dependency> < dependency> < groupId> org.apache.spark groupId> < artifactId> spark-core_2.12 artifactId> < version> 3.0.1 version> dependency> < dependency> < groupId> org.apache.spark groupId> < artifactId> spark-sql_2.12 artifactId> < version> 3.0.1 version> dependency> < dependency> < groupId> org.scalanlp groupId> < artifactId> breeze_2.12 artifactId> < version> 1.1 version> dependency> < dependency> < groupId> org.apache.hadoop groupId> < artifactId> hadoop-client artifactId> < version> 2.7.4 version> dependency> < dependency> < groupId> org.apache.hbase groupId> < artifactId> hbase-client artifactId> < version> 1.3.1 version> dependency> < dependency> < groupId> org.apache.hbase groupId> < artifactId> hbase-server artifactId> < version> 1.3.1 version> dependency> < dependency> < groupId> com.typesafe groupId> < artifactId> config artifactId> < version> 1.3.3 version> dependency> < dependency> < groupId> mysql groupId> < artifactId> mysql-connector-java artifactId> < version> 5.1.38 version> dependency> < dependency> < groupId> org.apache.spark groupId> < artifactId> spark-mllib_2.12 artifactId> < version> 3.0.1 version> dependency> < dependency> < groupId> org.apache.spark groupId> < artifactId> spark-streaming_2.12 artifactId> < version> 3.0.1 version> dependency> < dependency> < groupId> com.github.scopt groupId> < artifactId> scopt_2.12 artifactId> < version> 3.5.0 version> dependency>
然后App改内容 /**
*/ object Main extends App { println( “Hello World!” ) }
最后添加配置 先这样 然后这样
接着这样