看来Springboot自动配置使用Logback和Tomcat.我想禁用它并使用我在类路径中提供的那个.
以下错误消息.
LoggerFactory不是Logback LoggerContext,但Logback在类路径上.删除Logback或竞争实现(类org.slf4j.impl.SimpleLoggerFactory)类[org.slf4j.impl.SimpleLoggerFactory]的对象必须是类ch.qos.logback.classic.LoggerContext的实例
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>spring-boot-starter-parent</artifactId>
<groupId>org.springframework.boot</groupId>
<version>1.0.1.RELEASE</version>
</parent>
<groupId>com.fe</groupId>
<artifactId>cloudapp</artifactId>
<version>1.0.0</version>
<name>Withinet-PaaS</name>
<description>Develop your web applications in on our infrastructure and we will worry about administration and scalability of your app.</description>
<properties>
<java.version>1.7</java.version>
<guava.version>16.0.1</guava.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
<version>1.8</version>
</dependency>
<dependency>
<groupId>com.withinet.cloudapp</groupId>
<artifactId>slave</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-core</artifactId>
<version>6.15.0</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.3.0.Final</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.4</version>
</dependency>
<!-- Spring Boot -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId> …Run Code Online (Sandbox Code Playgroud) 我正在使用 Java Web 应用程序,并且我想要一个反向代理来屏蔽我的一些内部端点。
要求
1. 反向代理映射需要在运行时可修改,例如,如果我们将某些组件移动到另一台服务器,我们应该能够修改映射,以便将新请求路由到此端点。
2. 这必须可以嵌入到像 Jetty 这样的标准 servlet 容器中。
大多数 Java 反向代理(例如 J2EP)都需要在启动应用程序之前提供映射信息。
我有一个休息应用程序规范,允许任何用户向端点发送POST请求,但将GET限制为仅限系统的注册用户.有没有办法公开端点的某些方法,如(POST或PUT),并限制其他方法,如(GET或UPDATE),而不是仅仅保护端点的所有方法.
这更像是一个设计问题,我很好奇为什么HashSet不支持使用add的put操作.
如果我想将具有相同hashCode的对象更新为现有对象,我必须这样做:
hashSet.remove(o);
hasSet.add(o);
Run Code Online (Sandbox Code Playgroud)
我想一个
hashSet.add(o);
Run Code Online (Sandbox Code Playgroud)
应该已经足够了,因为无论如何它在引擎盖下都使用了HashMap.