数据库第二次大作业boostore
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

156 lines
3.7 KiB

<!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">&nbsp;package cn.edu.ecnu.stu.bookstore.config;
&nbsp;
&nbsp;import org.springframework.amqp.core.*;
&nbsp;import org.springframework.context.annotation.Bean;
&nbsp;import org.springframework.context.annotation.Configuration;
&nbsp;
&nbsp;import java.util.HashMap;
&nbsp;import java.util.Map;
&nbsp;
&nbsp;@Configuration
<b class="fc">&nbsp;public class RabbitMqConfig {</b>
&nbsp;
&nbsp; public static final String EXPIRED_ORDER_EXCHANGE = &quot;exchange.expire.order&quot;;
&nbsp;
&nbsp; public static final String EXPIRED_ORDER_QUEUE = &quot;queue.expire.order&quot;;
&nbsp;
&nbsp; public static final String EXPIRED_ORDER_ROUTING_KEY = &quot;routingKey.expire.order&quot;;
&nbsp;
&nbsp; public static final int ORDER_EXPIRE_TIME = 1000 * 60 * 15;
&nbsp;
&nbsp; @Bean
&nbsp; public Queue expiredOrderQueue() {
<b class="fc">&nbsp; return new Queue(EXPIRED_ORDER_QUEUE, true);</b>
&nbsp; }
&nbsp;
&nbsp; @Bean
&nbsp; public CustomExchange expiredOrderExchange() {
<b class="fc">&nbsp; Map&lt;String,Object&gt; map = new HashMap&lt;&gt;();</b>
<b class="fc">&nbsp; map.put(&quot;x-delayed-type&quot;,&quot;direct&quot;);</b>
<b class="fc">&nbsp; return new CustomExchange(EXPIRED_ORDER_EXCHANGE, &quot;x-delayed-message&quot;, true, false, map);</b>
&nbsp; }
&nbsp;
&nbsp; @Bean
&nbsp; public Binding expiredOrderBinding() {
<b class="fc">&nbsp; return BindingBuilder.bind(expiredOrderQueue()).to(expiredOrderExchange()).with(EXPIRED_ORDER_ROUTING_KEY).noargs();</b>
&nbsp; }
&nbsp;}
</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>