2016-09-15 3 views
0

설명서에 따라 Spring-boot-starter-jetty 용 spring-boot-starter-web과 모든 나머지 컨트롤러는 이전과 같이 작동해야합니다. 이상하게도이 작업을 수행 한 후에는 단일 컨트롤러가 맵핑되지 않고 액추에이터 스타터에서 맵핑되지 않습니다.spring-boot-startter-web을 spring-boot-startter-jersey로 전환 할 때 이상한 동작

<?xml version="1.0" encoding="UTF-8"?> 
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 
    <modelVersion>4.0.0</modelVersion> 

    <groupId>com.example</groupId> 
    <artifactId>myproject</artifactId> 
    <version>0.0.1-SNAPSHOT</version> 

    <!-- Inherit defaults from Spring Boot --> 
    <parent> 
     <groupId>org.springframework.boot</groupId> 
     <artifactId>spring-boot-starter-parent</artifactId> 
     <version>1.4.0.RELEASE</version> 
    </parent> 

    <!-- Add typical dependencies for a web application --> 
    <dependencies> 
     <dependency> 
      <groupId>org.springframework.boot</groupId> 
      <artifactId>spring-boot-starter-web</artifactId> 
      <exclusions> 
       <exclusion> 
        <groupId>org.springframework.boot</groupId> 
        <artifactId>spring-boot-starter-tomcat</artifactId> 
       </exclusion> 
      </exclusions> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework.boot</groupId> 
      <artifactId>spring-boot-starter-jetty</artifactId> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework.boot</groupId> 
      <artifactId>spring-boot-starter-actuator</artifactId> 
     </dependency> 
    </dependencies> 

    <!-- Package as an executable jar --> 
    <build> 
     <plugins> 
      <plugin> 
       <groupId>org.springframework.boot</groupId> 
       <artifactId>spring-boot-maven-plugin</artifactId> 
      </plugin> 
     </plugins> 
    </build> 

</project> 
+0

_ "내 모든 나머지 컨트롤러는 이전과 같이 작동합니다"_ - 아니 . 완전히 다른 프레임 워크. –

+0

정확히 같은 API가 더 비슷합니다. –

+0

제목은 "저지"이지만 질문은 "부두"라고 말합니다. 어느 분이세요? –

답변

0

아래

응원단은 당신이 당신의 치어 파일의 저지 스타터 종속성을 추가 잊어 버린 생각

<dependency> 
      <groupId>org.springframework.boot</groupId> 
      <artifactId>spring-boot-starter-jersey</artifactId> 
</dependency> 
관련 문제