小编niy*_*asc的帖子

我们怎样才能将div放在一个带左右按钮的div中?

在我的代码中,我试图将箭头按钮放在div的最左边和右边,而middiv必须在div的中间我已经看到manny问题但是没有得到正确的答案可以任何人帮助我究竟是什么问题是?.

我想要的是mid任何大小的div,所以它包含5个按钮,但它可能包含更多或更少,所以如何居中这个div所以这是可以实现的.

#page-nav{
        width:400px;
        border:1px solid;
        height:20px;
}
    
#right{
        float:right;
}
#mid{
        margin: 0 auto;
        width:auto;
}
Run Code Online (Sandbox Code Playgroud)
<div id='page-nav'>
          
  <button id=left></button>
        
  <div id="mid">
    <button>1</button>
    <button>2</button>
    <button>3</button>
    <button>4</button>
    <button>5</button>
    
  </div>
    
  <button id="right"></button>
</div>


 
Run Code Online (Sandbox Code Playgroud)

html css

11
推荐指数
1
解决办法
1278
查看次数

org.springframework.boot.context.embedded 不存在 - Gradle 构建 Spring Boot Jetty

我正在尝试用 Jetty 替换 Tomcat,作为我的嵌入式 servlet 容器。然后需要使用EmbeddedServletContainerCustomizer()来配置将80端口的请求重定向到443端口(HTTPS)。但是我一开始就被这些gradlew构建错误困住了:

RedirectHttpToHttpsOnJettyConfig.java:7: 错误:包 org.springframework.boot.context.embedded 不存在

导入 org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer;

RedirectHttpToHttpsOnJettyConfig.java:8: 错误:包 org.springframework.boot.context.embedded 不存在

导入 org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer;

RedirectHttpToHttpsOnJettyConfig.java:9: 错误:包 org.springframework.boot.context.embedded.jetty 不存在

导入 org.springframework.boot.context.embedded.jetty.JettyEmbeddedServletContainerFactory;

RedirectHttpToHttpsOnJettyConfig.java:10: 错误:包 org.springframework.boot.context.embedded.jetty 不存在

导入 org.springframework.boot.context.embedded.jetty.JettyServerCustomizer;

...

这是我的 build.gradle:

buildscript {
    ext {
        springBootVersion = '2.0.0.BUILD-SNAPSHOT'
    }
    repositories {
        mavenCentral()
        maven { url "https://repo.spring.io/snapshot" }
        maven { url "https://repo.spring.io/milestone" }
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
    }
}

apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'

ext['thymeleaf.version'] = '3.0.9.RELEASE'

war { …
Run Code Online (Sandbox Code Playgroud)

embedded-jetty spring-boot

0
推荐指数
1
解决办法
1万
查看次数

如何在arraylist中指定字段并使用简单的Java 8代码设置为列表?

我有一个名为的列表accountList.这个循环有没有简单的Java 8替代品?

List<Long> accountIdList = new ArrayList<Long>();
for(Account account: accountList){
    accountIdList.add(account.getId());
}
Run Code Online (Sandbox Code Playgroud)

java

-1
推荐指数
1
解决办法
61
查看次数

标签 统计

css ×1

embedded-jetty ×1

html ×1

java ×1

spring-boot ×1