scala - 使用 sbt 的 eclipse 插件配置开发环境碰到的问题
迷茫
迷茫 2017-04-21 11:17:05
0
3
548

我在windows上用sbteclipse插件生成了了一个项目,并在build.sbt文件中配置了项目依赖如下:

name := "xxxxx" version := "0.0.1-SNAPSHOT" libraryDependencies += "org.springframework" % "spring-jdbc" % "3.1.0.RELEASE"

之后使用sbt compile命令想编译了一次,看到依赖的包都下载下来了。然后又使用sbt console进入了scala EPEL尝试导入spring的相关包也都可以,没有问题。

但是在eslipse里面导入项目之后再尝试import org.springframework._则提示找不到相关的类。spring jdbc的相关功能(注解,Datasource类等等) 都无法使用。。

头疼死,求帮忙!

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all (3)
洪涛

It feels like there is a missing command. If you are using maven, you need to execute it

mvn eclipse:eclipse

sbt I guess there is a similar command

    Peter_Zhu

    It is recommended to use IDEA, which can directly import sbt projects, just like importing mavne projects.
    At the same time, there are also plug-ins such as sbt-idea that can be used.

    For Eclipse, you can use the sbteclipse plug-in: https://github.com/typesafehub/sbteclipse

      PHPzhong

      It is recommended to use IntelliJ Idea. Eclipse’s support for Scala is still not as good as Idea.

        Latest Downloads
        More>
        Web Effects
        Website Source Code
        Website Materials
        Front End Template
        About us Disclaimer Sitemap
        php.cn:Public welfare online PHP training,Help PHP learners grow quickly!