We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a6bb2e4 commit 477e3b3Copy full SHA for 477e3b3
src/main/java/com/kaluzny/Application.java
@@ -3,6 +3,9 @@
3
import org.springframework.boot.SpringApplication;
4
import org.springframework.boot.autoconfigure.SpringBootApplication;
5
6
+import javax.inject.Inject;
7
+import javax.persistence.EntityManagerFactory;
8
+
9
@SpringBootApplication
10
public class Application {
11
src/main/java/com/kaluzny/config/SecurityConfig.java
@@ -23,4 +23,4 @@ protected void configure(HttpSecurity http) throws Exception {
23
http.httpBasic();
24
http.csrf().disable();
25
}
26
-}
+}
src/main/java/com/kaluzny/domain/Book.java
@@ -8,12 +8,10 @@
public class Book {
@Id
- @GeneratedValue(strategy = GenerationType.AUTO)
+ @GeneratedValue(strategy = GenerationType.SEQUENCE)
12
private Long id;
13
-
14
private String name;
15
private String description;
16
17
@ElementCollection(fetch = FetchType.EAGER)
18
@CollectionTable(name = "tag")
19
@Column(name = "Value")
@@ -36,10 +34,19 @@ public String getName() {
36
34
return name;
37
35
38
+ public void setName(String name) {
+ this.name = name;
39
+ }
40
41
public String getDescription() {
42
return description;
43
44
45
+ public void setDescription(String description) {
46
+ this.description = description;
47
48
49
50
public List<String> getTags() {
51
return tags;
52
@@ -57,4 +64,4 @@ public String toString() {
57
64
", tags=" + tags +
58
65
'}';
59
66
60
67
src/main/java/com/kaluzny/domain/BookRepository.java
@@ -8,4 +8,4 @@
@RepositoryRestResource
public interface BookRepository extends JpaRepository<Book, Long> {
List<Book> findByName(String name);
src/main/resources/application.yml
@@ -4,7 +4,7 @@ spring:
active: development
# Database
datasource:
- driverClassName: org.postgresql.Driver
+ driver-class-name: org.postgresql.Driver
url: jdbc:postgresql://localhost:5432/book_db?createDatabaseIfNotExist=true
username: postgres
password: postgres
@@ -24,7 +24,6 @@ logging:
level:
org.springframework: INFO
org.hibernate: DEBUG
27
28
# Server configuration
29
server:
30
port: 8080
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments