我想在Branch分割合并Branch时从Intellij Idea 上的Merge上禁用自动提交,如下所示.
我知道如果我们使用Merge Branch Dialog,我可以选择No Commit
.
当我branch
从Branch View对话框合并时,我可以在合并时禁用自动提交吗?
我是Docker的新手,我正在玩弄docker volume
.我想指定docker volume
存储数据的位置.就像-v
我们执行时提供选项一样docker run
.Ex : -v /somefolder/:/var/somefolder
我们如何在创建时设置自定义Mountpointdocker volume
.我没有在docs上找到任何选项.
当我检查音量时
[
{
"Name": "sampleproject_mysql_data",
"Driver": "local",
"Mountpoint": "/mnt/sda1/var/lib/docker/volumes/sampleproject_mysql_data/_data",
"Labels": null,
"Scope": "local"
}
]
Run Code Online (Sandbox Code Playgroud)
我得到了类似的东西.
docker volume
命令还是通过docker-compose.yml
?在我的项目中,我想使用Spring Boot
和Angular 2.
Spring Boot App
由Spring Initializer完成 .Angular 2 App
由Angular CLI
工具(ng new myfrontendapp
)完成在Angular 1
你可以把你index.html
变成公共文件夹中.
在Angular 2
该index.html
中生成src
文件夹,我想保持这种结构.
我的问题是我应该怎么做才能index.html
看到Spring Boot
并保持生成的结构Angular CLI.
谢谢你的回答.
@Converter
即使autoApply = true
添加也不会应用。当作品@Convert
被添加到域本身。
这是一个代码 Converter
package com.example.hibernate.model;
@Converter(autoApply = true)
public class HeightConverter implements AttributeConverter<Height, Integer> {
public Integer convertToDatabaseColumn(Height height) {//convert}
public Height convertToEntityAttribute(Integer dbData) {//convert}
}
Run Code Online (Sandbox Code Playgroud)
类,其中Height
使用
package com.example.hibernate.model;
@Entity
@Table(name = "student")
public class Student implements Serializable {
@Id
@GeneratedValue(generator = "MY_S")
private int id;
// works if @Convert is applied
// @Convert( converter = HeightConverter.class, disableConversion = false )
@Column(name = "height_in_cm")
private Height height;
//getter setter
}
Run Code Online (Sandbox Code Playgroud)
我正在使用 …
我有一种情况,我想为我的领域定义各种行为.
class SomePage {
//...
@FindBy(id = "selectEthinicity")
private WebElement ethinicitySelect;
@FindBy(id = "someId")
private WebElement usernameInputField;
@FindBy(id = "buttonSubmit")
private WebElement submitButton;
public void selectEthnicity(String param) throws Exception {
new Select(ethnicitySelect).selectByVisibleText(param);
}
public void selectEthnicityByIndex(String param) throws Exception {
new Select(ethnicitySelect).selectByIndex(Integer.parseInt(param));
}
public int getSelectEthinicityNumberOfOptions() {
new Select(ethnicitySelect).getOptions().size();
}
public void waitForOptionOfSelectEthnicityToLoad() {
//logic to wait for an options of Ethinicity to load
}
public void selectEthnicity_Wait(String param) throws Exception {
//wait
//select Ethinicity
}
public void selectEthnicityByIndex_Wait(String param) …
Run Code Online (Sandbox Code Playgroud) 我使用 JHipster 和 Gradle 作为构建工具生成了应用程序。
当我创建实体时,我添加了过滤支持,从而生成了 JPA 静态元模型。但是 IntelliJ 无法识别元模型。
我在 IntelliJ 上启用了注释处理器设置,但它似乎不起作用。
我必须更改哪些设置才能让 IntelliJ 识别 JPA 静态元模型?
我有很多帖子_posts
.帖子文件有如下图案
??? _posts
? ??? 2016-10-02-SomeContent.md
? ??? 2016-10-03-AnotherContent.md
Run Code Online (Sandbox Code Playgroud)
在我的本地机器上(ubuntu 16.04 LTS)如果我在我的post file
名字前面添加了future date
类似2017-10-03-FutureContent.md
未来日期前缀的帖子,则不会显示.
我正在使用bundle exec jekyll serve
该项目
但是当我把它推到Github
可见的位置并将发布日期显示为未来日期时.
为什么我不能在我的本地机器上看到帖子,但是当它被推送到Github时它是可见的?
弹簧座控制器
@PostMapping(
value = "/post",
produces = MediaType.APPLICATION_JSON_VALUE,
consumes = {MediaType.APPLICATION_JSON_VALUE, MediaType.MULTIPART_FORM_DATA_VALUE}
)
public ResponseEntity<User> handleFileUpload(@RequestParam("user") User user, @RequestPart("file") MultipartFile file) {
// do something with User and file
return ResponseEntity.ok().build();
}
Run Code Online (Sandbox Code Playgroud)
角度服务
@Injectable()
export class UploadFileService {
constructor(private http: HttpClient) { }
pushFileToStorage(file: File): Observable<HttpEvent<{}>> {
let formdata: FormData = new FormData();
formdata.append('file', file);
formdata.append('user', JSON.stringify(new User('John', 12)))
const req = new HttpRequest('POST', '/post', formdata, {
reportProgress: true,
});
return this.http.request(req);
}
}
Run Code Online (Sandbox Code Playgroud)
当我尝试发送请求时,我得到 500 Internal Server Error.
这是一个请求头 …
当我Entity
使用Java JPA 创建类时,会生成静态元模型。
如果我将实体转换为Kotlin JPA,则不会生成静态元模型。
如何解决这个问题呢?
编辑
我正在使用Gradle作为构建工具。
我正在使用Spring Boot 1.3.3.RELEASE。默认情况下,Spring Boot使用Hibernate Version4.x。我正在尝试使用新的Hibernate,即5.1.0 FINAL(截至目前)。
我正在使用Gradle,以便覆盖Hibernate版本,所以我添加了以下行
ext['hibernate.version']="5.1.0.Final"
Run Code Online (Sandbox Code Playgroud)
我正在使用以下方法命名策略
spring.jpa.properties.hibernate.naming.implicit-strategy: org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyHbmImpl
spring.jpa.properties.hibernate.naming.physical_strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
Run Code Online (Sandbox Code Playgroud)
我有一个实体课
@Entity
public class AppUser {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@NotNull
@Length(max = 100)
private String username;
@NotNull
@Length(max = 100)
private String firstName;
@NotNull
@Length(max = 100)
private String lastName;
@Length(max = 100)
private String middleName;
@NotNull
@Length(max=100)
private String email;
@NotNull
@Length(max = 100)
private String password;
@NotNull
private boolean enabled;
}
Run Code Online (Sandbox Code Playgroud)
在Hibernate 4.x上,它执行查询
create table app_user …
Run Code Online (Sandbox Code Playgroud)