小编Nas*_*hPL的帖子

Vim命令和映射

嗨我在按F2时尝试制作VIM映射来运行脚本.我很难为使用vim编辑的文件获取完整路径到命令函数中.

nnoremap <F2> :! php /home/kbuczynski/diff_re.php fix <full file path here> flagArg
Run Code Online (Sandbox Code Playgroud)

任何的想法 ?

vim

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

使用 Java Spring 启动的 Redis 会话

我正在尝试使用在本地主机上破坏的 Redis 服务器来保存我的会话实例。当我启动应用程序时,我收到一条错误消息,应用程序无法启动。看起来类无法找到或 bean 错误,但我不太明白错误消息。

[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 4.739 s <<< FAILURE! - in com.kb.webkb.WebkbApplicationTests
[ERROR] contextLoads(com.kb.webkb.WebkbApplicationTests)  Time elapsed: 0.005 s  <<< ERROR!
java.lang.IllegalStateException: Failed to load ApplicationContext
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'redisMessageListenerContainer' defined in class path resource [org/springframework/session/data/redis/config/annotation/web/http/RedisHttpSessionConfiguration.class]: Unsatisfied dependency expressed through method 'redisMessageListenerContainer' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'connectionFactory' defined in class path resource [com/kb/webkb/configuration/session/SessionConfig.class]: Bean instantiation via factory …
Run Code Online (Sandbox Code Playgroud)

java spring spring-data-redis spring-boot spring-session

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

Angular2 ReactiveFormsModule意外的模块

我一直在研究我的应用程序.我想使用ReactiveFormsModule模块,但我得到了

错误:模块'AppModule'声明的意外模块'ReactiveFormsModule'

我已经在我的项目中安装了角度/形式,但似乎没有任何效果.任何的想法?

我的component.ts文件

import {Component} from '@angular/core';
import {FormGroup, FormControl} from '@angular/forms';


@Component({
  selector: 'app-crm-search',
  templateUrl: './crm-search.component.html',
  styleUrls: ['./crm-search.component.css'],
})
export class CrmSearchComponent{
  constructor() {
  }

  userForm = new FormGroup({
    searchTerm: new FormControl()
  });

  onSubmit(){
    console.log(this.userForm.value());
  }
}
Run Code Online (Sandbox Code Playgroud)

我的app.module.ts

import {BrowserModule} from '@angular/platform-browser';
import {NgModule} from '@angular/core';
import {FormsModule} from '@angular/forms';
import {HttpModule} from '@angular/http';
import {AlertModule} from 'ng2-bootstrap';
import {Select2Module} from 'ng2-select2';
import {RoutingModule} from './routing.module';
import {ReactiveFormsModule} from '@angular/forms';


import {AppComponent} from './app.component';
import {NavBarComponent} from './components/nav-bar/nav-bar.component'; …
Run Code Online (Sandbox Code Playgroud)

javascript import typescript angular

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