小编Nak*_*ule的帖子

OpenDaylight integration with OpenStack: Missing table in database

I have the following OpenStack infrastructure:

  • 2 compute nodes
  • 1 controller node

This work fine, I can create network, router, vm, etc... Now, I want to add an OpenDaylight controller in the cloud infrastructure using the service NetVirt. I follow the officiel OpenDaylight guide: http://docs.opendaylight.org/projects/netvirt/en/latest/openstack-guide/openstack-with-netvirt.html#installing-opendaylight-on-an-existing-openstack

Every step in the installation is done without any probleme. I can see the open vSwitch on each nodes managed by my SDN controller. At the end, when i restart Neutron to test if everything …

openstack opendaylight

7
推荐指数
0
解决办法
339
查看次数

无法在 Vim 中删除字符

Vim 有以下问题: 当我打开一个文件时,如果我处于插入模式,我无法删除任何字符/单词,除了打开文件之前尚未写入的内容。

在正常模式下,每个单词/字符删除命令都喜欢x或dw工作。

我的.vimrc:

" Vundle configuration
set nocompatible              " be iMproved, required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'

" ck the engine.
Plugin 'SirVer/ultisnips'

" Snippets are separated from the engine. Add this if you want them:
Plugin 'honza/vim-snippets'

" colorsheme theme
Bundle 'altercation/vim-colors-solarized'

" Trigger configuration. Do not use <tab> if you use …
Run Code Online (Sandbox Code Playgroud)

vim

3
推荐指数
1
解决办法
1714
查看次数

Java Springboot:仅返回对象的某些属性

假设有以下类:

public class Foo {
  String a, b, c, d;

  // The rest of the class...
}
Run Code Online (Sandbox Code Playgroud)

还有一个使用 Springboot 的 REST API 控制器:

@GetMapping("/foo")
public Foo myFuntion() {
    return new Foo(...);
}
Run Code Online (Sandbox Code Playgroud)

请求/foo返回此 JSON:

{
 "a": "...",
 "b": "...",
 "c": "...",
 "d": "..."
}
Run Code Online (Sandbox Code Playgroud)

但是,我只想返回Foo类的某些属性,例如,仅返回属性a和b.

如果不创建新类,我怎么能做到这一点?

java rest spring-boot

3
推荐指数
1
解决办法
953
查看次数

如何自动设置VIM文件类型?

我喜欢使用 VIM 帮助页面语法创建自己的文档。当我使用 VIM 打开文件时,我必须使用该命令set filetype=help从纯文本切换到帮助页面彩色语法(见下图)。我如何告诉 VIM 自动为我的帮助文件设置文件类型?是否可以使用特殊的文件扩展名或在文件的开头添加某些内容?

在此输入图像描述

vim

2
推荐指数
1
解决办法
1559
查看次数

使用 SpringBoot 内置日志服务记录完整的请求正文

我有一个 Java Springboot 应用程序,想要记录 HTTP 请求正文。我设法通过logging.level.org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor = DEBUG在我的application.properties. 当我收到请求时,这会创建一个很好的日志:

2020-04-27T10:12:46,041 DEBUG 40422 --- [-nio-443-exec-2] RequestResponseBodyMethodProcessor  : Read "application/json;charset=UTF-8" to ["{
    "cpName":"SSA, Test 1",
    "contractId":"1234567",
    "contractName":"SSA, Contract 1",
    "scnName":" (truncated)...]
Run Code Online (Sandbox Code Playgroud)

然而,仅显示了主体的开始部分。我没有该字段的值scnName,并且在调用该字段之后还有另一个字段description也没有出现。我搜索但找不到将整个正文写入日志的方法。是否需要更改任何设置才能打印所有内容?

先感谢您。

java rest logging spring-boot

2
推荐指数
1
解决办法
7660
查看次数

标签 统计

java ×2

rest ×2

spring-boot ×2

vim ×2

logging ×1

opendaylight ×1

openstack ×1