我正在尝试将现有的 Spring 项目迁移到 Spring Boot。在项目中已经使用了 Spring Data JPA/Hibernate 和带有 JDBC 的简单 DAO(使用了 PostgreSQL)。在少数几个州,我发现我需要在 Spring boot 上迁移的是:添加必要的依赖项添加入口点@SpringBootApplication利润,仅此而已。1) 依赖:<dependencyManagement> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-dependencies</artifactId> <version>${spring.boot.version}</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement><dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.9.4</version> </dependency><dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-jpa</artifactId> <version>2.0.5.RELEASE</version> </dependency><dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> <version>1.4.7.RELEASE</version> </dependency><dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jetty</artifactId> <version>1.4.7.RELEASE</version> </dependency>
添加回答
举报
0/150
提交
取消