2014-02-15 97 views
0

我是一个初学者在春天,我试图开发一个简单的应用程序,但我努力寻找一个工具,这将帮助我找到什么罐子或什么依赖项我应该添加到我的项目。我试过寻找春天依赖

http://search.maven.org/ 它适用于我正在寻找的一些罐子。它的工作对使用DriverManagerDataSource但是它不会为工作

org.springframework.boot.SpringApplication;

为了更精确:是否有一个工具,它会告诉我我需要什么罐子特定进口?

如何知道在我的构建路径中需要哪些jar以便成功编译以下代码行?

import org.springframework.boot.autoconfigure.EnableAutoConfiguration; 

回答

0

您尝试使用spring-boot,让阅读更多关于春天启动的位置:getting started

然后看看它是如何完成的。

你可以有最简单的pom.xml的是这样的:

<parent> 
    <groupId>org.springframework.boot</groupId> 
    <artifactId>spring-boot-starter-parent</artifactId> 
    <version>1.0.0.RC3</version> 
</parent> 
<dependencies> 
    <dependency> 
     <groupId>org.springframework.boot</groupId> 
     <artifactId>spring-boot-starter-web</artifactId> 
    </dependency> 
</dependencies> 
<repositories> 
    <repository> 
     <id>spring-milestones</id> 
     <name>Spring Milestones</name> 
     <url>http://repo.spring.io/milestone</url> 
     <snapshots> 
      <enabled>false</enabled> 
     </snapshots> 
    </repository> 
</repositories>