草庐IT

spring-properties

全部标签

报错:networks.app.ipam.config value Additional properties are not allowed (‘gateway‘

docker-compose启容器报错:networks.app.ipam.configvalueAdditionalpropertiesarenotallowed(‘gateway’wasunexpected)[root@localhost]#docker-composeup-dERROR:TheComposefile'./docker-compose.yml'isinvalidbecause:networks.app.ipam.configvalueAdditionalpropertiesarenotallowed('gateway'wasunexpected)原因:docker-comp

java - 带有 jdbc token 存储的 spring boot oauth2 给出 oauth_access_token 关系不存在

我正在尝试将springboot与OAuth2集成。通过遵循此https://github.com/royclarkson/spring-rest-service-oauth,我能够使它与InMemoryStore一起用于token。但是当我尝试使用JdbcTokenStore和postgres数据库实现它时,我得到了错误Handlingerror:BadSqlGrammarException,PreparedStatementCallback;badSQLgrammar[selecttoken_id,tokenfromoauth_access_tokenwhereauthentica

java - STOMP Spring WebSocket 消息超出大小限制

我正在将SpringWebSocket实现到我们的SpringMVCWeb应用程序中。但是,当我尝试向端点发送一条非常大的消息时,我遇到了超过大小限制的消息。我收到以下错误:message:The'content-length'header68718exceedstheconfiguredmessagebuffersizelimit6553614:49:11,506ERROR[org.springframework.web.socket.messaging.StompSubProtocolHandler](http-localhost/127.0.0.1:8080-4)Failedto

使用 Vaadin 进行 Spring Security 的 Java 配置

我是这些框架的新手(Vaadin:7.6.1,SpringSecurity:4.0.3),如果我想构建Vaadin应用程序,我在问自己如何配置授权请求。我查了几个这样写的例子:@EnableWebSecuritypublicclassSecurityConfigextendsWebSecurityConfigurerAdapter{[...]@Overrideprotectedvoidconfigure(HttpSecurityhttp)throwsException{http.authorizeRequests().antMatchers("/login**").permitAll(

java - 如何使用 "Spring Data JPA"规范进行单元测试方法

我在玩org.springframework.data.jpa.domain.Specifications,它只是一个基本的搜索:publicOptional>rechercheArticle(Stringcode,Stringlibelle){Listresult=null;if(StringUtils.isNotEmpty(code)&&StringUtils.isNotEmpty(libelle)){result=articleRepository.findAll(Specifications.where(ArticleSpecifications.egaliteCode(cod

java - Spring 网络 MVC : no request body possible for HTTP DELETE anymore

我有一个问题要问SpringWebMVC的开发人员。简而言之:以前可以在HTTPDELETE消息中发送请求主体,但现在不可能了。为什么?详细说明:我们正在使用spring-webmvc-4.2.4.RELEASE。@RestControllerpublicclassController{@RequestMapping(value="/{pathVariable}/deleteAnything",method=RequestMethod.DELETE)publicResponseEntitydeleteAnything(@PathVariableStringpathVariable,@V

java - 我无法设置我的 jndi.properties 来访问 Jboss 5 上的远程 EJB

我正在尝试设置Jboss服务器“客户端”(版本5.1.0)以使用来自另一个Jboss服务器(10.90.0.91)的远程EJB,但我无法使用Jboss客户端。我可以在我的客户端上使用这个简单的代码获取远程EJB:InitialContextctx=null;try{HashtablejndiProps=newHashtable();jndiProps.put(InitialContext.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");jndiProps.put(InitialContext.PROV

java - 如何在 Spring Boot 应用程序的 Feign 客户端上使用 WireMock?

我有一个使用Feign客户端的类。以前我使用Mockito并为Feign客户端中的每个方法调用提供存储的响应。现在我想使用WireMock,这样我就可以看到我的代码正确处理了不同类型的响应代码。我该怎么做呢?我不知道如何在测试中连接我的Feign客户端,并连接它以便它使用Wiremock而不是我在application.yml文件中设置的URL。任何指针将不胜感激。 最佳答案 也许你想看看这个项目https://github.com/ePages-de/restdocs-wiremock这有助于您在springmvc测试中生成和发布

java - AWS Elastic Beanstalk 上的 Spring Boot/Tomcat 仅显示 404 页面

我有一个SpringBoot应用程序,它在Tomcat下的本地主机上运行良好。当我将其打包为WAR并将其部署到ElasticBeanstalk上时,我只得到404页面。我尝试了许多不同的调整来尝试让它工作,但我不知所措。我已将打包配置为WAR,IntelliJ生成工件:com.ideaEngineapp_deployment0.0.1-SNAPSHOTwarUTF-8UTF-8com.xxxxxxxx.WebappApplication1.8我还包括了Tomcatorg.springframework.bootspring-boot-starter-tomcatprovidedElas

java - Spring 不发送 JSON 响应中的所有字段

我的POJO:importjava.io.Serializable;importjavax.persistence.Entity;importjavax.persistence.Id;importjavax.persistence.IdClass;importjavax.persistence.Table;importlombok.Data;@Entity@Table(name="user_linked_email")@IdClass(UserLinkedEmailKey.class)@DatapublicclassUserLinkedEmailimplementsSerializab