Java 无法解析导入org.atmosphere.annotation.Broadcast

Java 无法解析导入org.atmosphere.annotation.Broadcast,java,spring,atmosphere,Java,Spring,Atmosphere,虽然我在pom.xml中添加了以下依赖项 <dependency> <groupId>org.atmosphere</groupId> <artifactId>atmosphere-runtime</artifactId> <version>2.3.1</version> </dependency>

虽然我在pom.xml中添加了以下依赖项

    <dependency>
               <groupId>org.atmosphere</groupId>
               <artifactId>atmosphere-runtime</artifactId>
               <version>2.3.1</version>
    </dependency>

i am getting the error in the following code:

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.atmosphere.annotation.Broadcast;
import org.atmosphere.annotation.Suspend;

import java.io.IOException;

@Controller
@RequestMapping("/websocket")
public class ChatController {

             @Suspend
             @RequestMapping(value = "/suspend", method = RequestMethod.GET)
             @ResponseBody
             public String suspend() {
                 return "";
             }   

             @Broadcast(writeEntity = false)
             @RequestMapping(value = "/broadcast", method = RequestMethod.POST)
             @ResponseBody
             public String broadcast(String message) {
                  return "";//new Response(message.author, message.message);
             }   


}

组织气氛
大气运行时间
2.3.1
我在以下代码中得到错误:
导入org.springframework.stereotype.Controller;
导入org.springframework.web.bind.annotation.RequestMapping;
导入org.springframework.web.bind.annotation.RequestMethod;
导入org.springframework.web.bind.annotation.ResponseBody;
导入org.atmosphere.annotation.Broadcast;
导入org.atmosphere.annotation.Suspend;
导入java.io.IOException;
@控制器
@请求映射(“/websocket”)
公共类聊天控制器{
@暂停
@RequestMapping(value=“/suspend”,method=RequestMethod.GET)
@应答器
公共字符串挂起(){
返回“”;
}   
@广播(writentity=false)
@RequestMapping(value=“/broadcast”,method=RequestMethod.POST)
@应答器
公共字符串广播(字符串消息){
返回“”;//新响应(message.author,message.message);
}   
}

帮助我解决此问题

在pom.xml中添加以下依赖项后,此问题得到解决

<dependency> 
  <groupId>org.atmosphere</groupId> 
  <artifactId>atmosphere-annotations</artifactId>
  <version>2.3.1</version>
</dependency>

组织气氛
大气注释
2.3.1

在pom.xml::org.atmosphere annotations 2.3.1中添加以下依赖项后,该问题已解决。您可以将其添加为答案,并接受它,因为没有其他答案。