【发布时间】:2017-12-01 07:25:21
【问题描述】:
我正在开发一个 gradle 项目,请查看我的 build.gradle :
buildscript {
ext {
springBootVersion = '1.5.7.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
group = 'com.support.wizard'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
def swaggerVersion = "2.7.0"
dependencies {
compile('org.springframework.boot:spring-boot-starter-data-jpa')
compile('org.springframework.boot:spring-boot-starter-data-rest')
compile('org.springframework.boot:spring-boot-starter-web')
compile('org.springframework.boot:spring-boot-starter-security')
compile('org.springframework.security.oauth:spring-security-oauth2')
compile('org.springframework.integration:spring-integration-mail')
compile group: 'com.sun.mail', name: 'javax.mail', version: '1.5.2'
compile ("io.springfox:springfox-swagger2:${swaggerVersion}")
compile ("io.springfox:springfox-swagger-ui:${swaggerVersion}")
compile("mysql:mysql-connector-java:6.0.6")
compileOnly('org.projectlombok:lombok')
testCompile('org.springframework.boot:spring-boot-starter-test')
}
我正在使用日食霓虹灯。我刷新了 gradle 项目,但它不会为我的实体生成 getter 和 setter。
喜欢:
@Entity
@Table(name = "users")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String email;
private String username;
private String password;
private String phoneNumber;
private String role;
private String resetToken;
private boolean enabled;
}
当使用 Eclipse 的快捷键 Ctrl + O 搜索类中的方法和字段时,我看不到我的类的 getter 和 setter UserEntity
请问你有什么想法吗?
【问题讨论】: