青衣画白扇 2020-08-04 16:36 采纳率: 25%
浏览 225
已采纳

Springboot 中使用注解的方式自定义aop 后 其他的配置类启动报错

@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD,ElementType.PARAMETER})
public @interface DBChange {

}
@Aspect
@Component
public class DynamicDataSourceAspect {

@Pointcut("@annotation(com.zhou.datasource.annotation.DBChange)")
private void pointcut() {

}


    启动其他的配置类就报错
    @Configuration

public class WebSocketConfig {

  /**
       *  这个Bean会自动注册使用@ServerEndpoint注解声明的websocket endpoint
 */
@Bean
public ServerEndpointExporter serverEndpointExporter() {
    return new ServerEndpointExporter();
}

    有没
    有spring 的大佬帮忙看看啊
  • 写回答

3条回答 默认 最新

  • dabocaiqq 2020-08-04 16:47
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

问题事件

  • 已采纳回答 2月22日