New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
because "this.condition" is null #28794
Comments
springboot 2.5.7 is ok |
This is a springfox problem that should be reported against the relevant project. See also #28769 |
springfox/springfox#3462 is already tracking this on the Springfox side. |
be careful:
Not because springfox ,I have a problem using mqtt |
@weir2010 Can you please provide some more context for your comment? I don't see the connection between MQTT and web request path parsing. |
critical code: package com.yaken.config;
import java.util.Arrays;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.paho.client.mqttv3.MqttConnectOptions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.integration.annotation.IntegrationComponentScan;
import org.springframework.integration.annotation.ServiceActivator;
import org.springframework.integration.channel.DirectChannel;
import org.springframework.integration.core.MessageProducer;
import org.springframework.integration.mqtt.core.DefaultMqttPahoClientFactory;
import org.springframework.integration.mqtt.core.MqttPahoClientFactory;
import org.springframework.integration.mqtt.inbound.MqttPahoMessageDrivenChannelAdapter;
import org.springframework.integration.mqtt.outbound.MqttPahoMessageHandler;
import org.springframework.integration.mqtt.support.DefaultPahoMessageConverter;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.MessageHandler;
import org.springframework.messaging.MessagingException;
import com.yaken.mqtt.MqttReceiveService;
import lombok.extern.slf4j.Slf4j;
/**
* MQTT接收消息处理
*
* @author weir
*
* 2019年6月16日 下午2:41:45
*/
@Slf4j
@Configuration
@IntegrationComponentScan
public class MqttConfig {
private static final String MQTT_RECEIVEDTOPIC = "mqtt_receivedTopic";
private static final String SP_INBOUND = "_inbound";
private MqttPahoMessageDrivenChannelAdapter adapter;
@Value("${mqtt.username}")
private String username;
@Value("${mqtt.pwd}")
private String password;
@Value("${mqtt.url}")
private String hostUrl;
@Value("${mqtt.client.id}")
private String clientId;
@Value("${mqtt.default.topic}")
private String defaultTopic;
@Value("${mqtt.completionTimeout}")
private int completionTimeout;
@Autowired
private MqttReceiveService mqttReceiveService;
@Bean
public MqttConnectOptions getMqttConnectOptions() {
MqttConnectOptions mqttConnectOptions = new MqttConnectOptions();
mqttConnectOptions.setUserName(username);
mqttConnectOptions.setPassword(password.toCharArray());
mqttConnectOptions.setServerURIs(new String[] { hostUrl });
mqttConnectOptions.setKeepAliveInterval(2); // 设置会话心跳时间
return mqttConnectOptions;
}
@Bean
public MqttPahoClientFactory mqttClientFactory() {
DefaultMqttPahoClientFactory factory = new DefaultMqttPahoClientFactory();
factory.setConnectionOptions(getMqttConnectOptions());
return factory;
}
@Bean
@ServiceActivator(inputChannel = "mqttOutboundChannel")
public MessageHandler mqttOutbound() {
MqttPahoMessageHandler messageHandler = new MqttPahoMessageHandler(clientId, mqttClientFactory());
messageHandler.setAsync(true);
messageHandler.setDefaultTopic(defaultTopic);
return messageHandler;
}
@Bean
public MessageChannel mqttOutboundChannel() {
return new DirectChannel();
}
/**
* 接收通道
*
* @return MessageChannel
*/
@Bean
public MessageChannel mqttInputChannel() {
return new DirectChannel();
}
/**
* 配置client,监听的topic
*
* @return MessageProducer
*/
@Bean
public MessageProducer inbound() {
adapter = new MqttPahoMessageDrivenChannelAdapter(clientId + SP_INBOUND, mqttClientFactory(), defaultTopic);
adapter.setCompletionTimeout(completionTimeout);
adapter.setConverter(new DefaultPahoMessageConverter());
adapter.setOutputChannel(mqttInputChannel());
return adapter;
}
} |
@weir2010 It's still not clear how the sample code you've provided in the comment above relates to the stacktrace that you initially posted. If you believe that this is a Spring Boot issue please provide a sample application that (as a zip file for github project) that reproduces the issue and doesn't have springfox as a dependency. |
I found the problem. It's really swagger ok |
I have the same problem with the newest Spring version 2.6.1 and springfox-swagger2 version 3.0.0 . Is there a workaround? |
same problem as mentioned above |
Any update? Any plans to release a fixed version? |
Please read the issue history before commenting. This is a springfox issue and nothing we can do here. |
springfox/springfox#3462 (comment) helped me btw. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as off-topic.
This comment was marked as off-topic.
i resolve with spring boot 2.5.12 |
springboot 2.6.0 :
The text was updated successfully, but these errors were encountered: