首页 \ 问答 \ Spring-boot应用程序与Apache Artemis集群连接(Spring-boot app connect with Apache Artemis cluster)

Spring-boot应用程序与Apache Artemis集群连接(Spring-boot app connect with Apache Artemis cluster)

Spring-Boot可以在类路径中存在Artemis时自动配置连接工厂。 但是我们如何将spring-boot应用程序配置为原生Artemis集群(多个节点)


Spring-Boot can auto-configure a Connection Factory when it get that Artemis is available on the classpath. But how we can configure spring-boot application to native Artemis cluster (multiple nodes)


原文:https://stackoverflow.com/questions/47799152
更新时间:2022-01-09 12:01

最满意答案

显示的默认flex-direction display: flexrow - 将项目水平并排放置。 要使它们像列一样显示在彼此之上,请使用flex-direction: column

<html>
<head>
  <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
  <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
  <style>
  .container
  {
    position: relative;
    background-color: #00ffcc;
    margin: 0 auto;
    padding: 1em 3em;
    box-shadow: 0px 0px 35px rgba(0, 0, 0, 1);
    font-size: 15px;
    display: none;
  }
  .register
  {
    position: relative;
    background-color: #ff0066;
    margin: 0 auto;
    padding: 1em 3em;
    box-shadow: 0px 0px 35px rgba(0, 0, 0, 1);
    font-size: 15px;
    display: none;
    clear: left;
  }
  .background
  {
    display: flex;
    align-items: center;
    background-image: url("bg.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    width: 100vw;
    height: 100vh;
    float: none;
    flex-direction: column;
    justify-content: center;
  }
  </style>
</head>
<body>
  <div class="background">
    <div class="container text-center" id="container">
      <h1>Login</h1>
      <br>
      <form action="login.php" method="post">
        <p>
          Username:
        </p>
        <input name="name" type="text" class="form-control"/>
        <br>
        <p>
          Password:
        </p>
        <input name="pw" type="password" class="form-control"/>
        <br>
        <button type="submit" class="btn btn-primary">Submit</button>
        <button type="button" class="btn btn-danger" id="register">Register</button>
      </form>
    </div>
    <div class="register">
        Register
    </div>
  </div>
  <script>
  $(document).ready(function(){
    $("#container").delay(75).fadeIn(250);
    $("#register").click(function(){
      $(".register").slideToggle();
    });
  });
  </script>
</body>
</html>


The default flex-direction for display: flex is row - that will put items side-by-side horizontally. To make them display on top of one another, like a column, use flex-direction: column

<html>
<head>
  <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
  <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
  <style>
  .container
  {
    position: relative;
    background-color: #00ffcc;
    margin: 0 auto;
    padding: 1em 3em;
    box-shadow: 0px 0px 35px rgba(0, 0, 0, 1);
    font-size: 15px;
    display: none;
  }
  .register
  {
    position: relative;
    background-color: #ff0066;
    margin: 0 auto;
    padding: 1em 3em;
    box-shadow: 0px 0px 35px rgba(0, 0, 0, 1);
    font-size: 15px;
    display: none;
    clear: left;
  }
  .background
  {
    display: flex;
    align-items: center;
    background-image: url("bg.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    width: 100vw;
    height: 100vh;
    float: none;
    flex-direction: column;
    justify-content: center;
  }
  </style>
</head>
<body>
  <div class="background">
    <div class="container text-center" id="container">
      <h1>Login</h1>
      <br>
      <form action="login.php" method="post">
        <p>
          Username:
        </p>
        <input name="name" type="text" class="form-control"/>
        <br>
        <p>
          Password:
        </p>
        <input name="pw" type="password" class="form-control"/>
        <br>
        <button type="submit" class="btn btn-primary">Submit</button>
        <button type="button" class="btn btn-danger" id="register">Register</button>
      </form>
    </div>
    <div class="register">
        Register
    </div>
  </div>
  <script>
  $(document).ready(function(){
    $("#container").delay(75).fadeIn(250);
    $("#register").click(function(){
      $(".register").slideToggle();
    });
  });
  </script>
</body>
</html>

相关问答

更多
  • 使用2级flex,一个用于导航,另一个用于左侧和右侧 html { font-family: sans-serif; font-size: 16px; } a { text-decoration: none; } .navigation { align-items: center; background: #000; color: #fff; display: flex; justify-content: center; padding: 1re ...
  • 给出包含div的position:relative; 和孩子的position:absolute; 现在,子div将相对于父div进行定位。 (从父div的左上角开始) 例如。 .fresh_bnr_img{ position:relative; float:left; width:950px; text-align:center; } .black_strip1{ position:absolute; top:20px; /* 20px from the top edge of .fres ...
  • 我使用标签位置:绝对; 关于我想要移动的内容如下: #contentholder{ position: absolute; margin-left: 100px margin-top: 200px } 但要使边距与您希望该内容的位置相关。 I use the tag position: absolute; on the content I want to move like this: #contentholder{ position: absolute; margin-left: 100px margi ...
  • 你应该使width: 50%; 的图表,并使它们显示: inline-block; 如果我正确理解你的话。 div { display: inline-block; min-width: 49%; height: 200px; background: red; border: 1px solid #fff; }
    test
    test
    test
  • 我不会使用top,怎么样: .topwrap{ clear: both; position:relative; float: left; background:#EEE; margin-top: 100px; } .lowerwrap{ position:relative; float: left; background:#555; display: block; } 我在这里创建了一个简单的小提琴: https : //jsfi ...
  • 要叠加它们,您可以将位置设置为相对或绝对,以使z-index起作用。 确保将定位应用于要堆叠的所有元素。 通常,我在容器div中的所有层上使用绝对位置,该容器div设置为position:relative。 这允许您使用容器来定位整个堆栈,并且层div将相对于容器而不是主体定位。 .container{ position:relative; } .layer1, .layer2 { position:absolute; top:0; //position the layers to ...
  • 显示的默认flex-direction display: flex是row - 将项目水平并排放置。 要使它们像列一样显示在彼此之上,请使用flex-direction: column