|
|
|
|
|
|
<!DOCTYPE html>
|
|
<html id="htmlId">
|
|
<head>
|
|
<title>Coverage Report > RabbitMqConfig</title>
|
|
<style type="text/css">
|
|
@import "../../css/coverage.css";
|
|
@import "../../css/idea.min.css";
|
|
</style>
|
|
<script type="text/javascript" src="../../js/highlight.min.js"></script>
|
|
<script type="text/javascript" src="../../js/highlightjs-line-numbers.min.js"></script>
|
|
</head>
|
|
|
|
<body>
|
|
<div class="content">
|
|
<div class="breadCrumbs">
|
|
Current scope: <a href="../../index.html">all classes</a>
|
|
<span class="separator">|</span>
|
|
<a href="../index.html">cn.edu.ecnu.stu.bookstore.config</a>
|
|
</div>
|
|
|
|
<h1>Coverage Summary for Class: RabbitMqConfig (cn.edu.ecnu.stu.bookstore.config)</h1>
|
|
|
|
<table class="coverageStats">
|
|
|
|
<tr>
|
|
<th class="name">Class</th>
|
|
<th class="coverageStat
|
|
">
|
|
Method, %
|
|
</th>
|
|
<th class="coverageStat
|
|
">
|
|
Line, %
|
|
</th>
|
|
</tr>
|
|
<tr>
|
|
<td class="name">RabbitMqConfig</td>
|
|
<td class="coverageStat">
|
|
<span class="percent">
|
|
100%
|
|
</span>
|
|
<span class="absValue">
|
|
(4/4)
|
|
</span>
|
|
</td>
|
|
<td class="coverageStat">
|
|
<span class="percent">
|
|
100%
|
|
</span>
|
|
<span class="absValue">
|
|
(6/6)
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name">RabbitMqConfig$$EnhancerBySpringCGLIB$$61d67e2e</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name">RabbitMqConfig$$EnhancerBySpringCGLIB$$61d67e2e$$FastClassBySpringCGLIB$$8f7bb979</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name">RabbitMqConfig$$FastClassBySpringCGLIB$$3710fc4e</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name"><strong>Total</strong></td>
|
|
<td class="coverageStat">
|
|
<span class="percent">
|
|
100%
|
|
</span>
|
|
<span class="absValue">
|
|
(4/4)
|
|
</span>
|
|
</td>
|
|
<td class="coverageStat">
|
|
<span class="percent">
|
|
100%
|
|
</span>
|
|
<span class="absValue">
|
|
(6/6)
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br/>
|
|
<br/>
|
|
|
|
|
|
<pre>
|
|
<code class="sourceCode" id="sourceCode"> package cn.edu.ecnu.stu.bookstore.config;
|
|
|
|
import org.springframework.amqp.core.*;
|
|
import org.springframework.context.annotation.Bean;
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
|
|
@Configuration
|
|
<b class="fc"> public class RabbitMqConfig {</b>
|
|
|
|
public static final String EXPIRED_ORDER_EXCHANGE = "exchange.expire.order";
|
|
|
|
public static final String EXPIRED_ORDER_QUEUE = "queue.expire.order";
|
|
|
|
public static final String EXPIRED_ORDER_ROUTING_KEY = "routingKey.expire.order";
|
|
|
|
public static final int ORDER_EXPIRE_TIME = 1000 * 60 * 15;
|
|
|
|
@Bean
|
|
public Queue expiredOrderQueue() {
|
|
<b class="fc"> return new Queue(EXPIRED_ORDER_QUEUE, true);</b>
|
|
}
|
|
|
|
@Bean
|
|
public CustomExchange expiredOrderExchange() {
|
|
<b class="fc"> Map<String,Object> map = new HashMap<>();</b>
|
|
<b class="fc"> map.put("x-delayed-type","direct");</b>
|
|
<b class="fc"> return new CustomExchange(EXPIRED_ORDER_EXCHANGE, "x-delayed-message", true, false, map);</b>
|
|
}
|
|
|
|
@Bean
|
|
public Binding expiredOrderBinding() {
|
|
<b class="fc"> return BindingBuilder.bind(expiredOrderQueue()).to(expiredOrderExchange()).with(EXPIRED_ORDER_ROUTING_KEY).noargs();</b>
|
|
}
|
|
}
|
|
</code>
|
|
</pre>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
(function() {
|
|
var msie = false, msie9 = false;
|
|
/*@cc_on
|
|
msie = true;
|
|
@if (@_jscript_version >= 9)
|
|
msie9 = true;
|
|
@end
|
|
@*/
|
|
|
|
if (!msie || msie && msie9) {
|
|
hljs.highlightAll()
|
|
hljs.initLineNumbersOnLoad();
|
|
}
|
|
})();
|
|
</script>
|
|
|
|
<div class="footer">
|
|
|
|
<div style="float:right;">generated on 2023-12-12 18:32</div>
|
|
</div>
|
|
</body>
|
|
</html>
|