|
5 | 5 | * you may not use this file except in compliance with the License. |
6 | 6 | * You may obtain a copy of the License at |
7 | 7 | * |
8 | | - * https://www.apache.org/licenses/LICENSE-2.0 |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
9 | 9 | * |
10 | 10 | * Unless required by applicable law or agreed to in writing, software |
11 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
|
25 | 25 | @SpringBootApplication |
26 | 26 | public class VectorApp { |
27 | 27 |
|
28 | | - public static void main(String[] args) { |
29 | | - SpringApplication.run(VectorApp.class, args); |
30 | | - } |
| 28 | + public static void main(String[] args) { |
| 29 | + SpringApplication.run(VectorApp.class, args); |
| 30 | + } |
31 | 31 |
|
32 | | - @Component |
33 | | - static class DbInitializer implements CommandLineRunner { |
| 32 | + @Component |
| 33 | + static class DbInitializer implements CommandLineRunner { |
34 | 34 |
|
35 | | - private final CassandraTemplate template; |
| 35 | + private final CassandraTemplate template; |
36 | 36 |
|
37 | | - DbInitializer(CassandraTemplate template) { |
38 | | - this.template = template; |
39 | | - } |
| 37 | + DbInitializer(CassandraTemplate template) { |
| 38 | + this.template = template; |
| 39 | + } |
40 | 40 |
|
41 | | - @Override |
42 | | - public void run(String... args) { |
| 41 | + @Override |
| 42 | + public void run(String... args) { |
43 | 43 |
|
44 | | - template.truncate(Comment.class); |
| 44 | + template.truncate(Comment.class); |
45 | 45 |
|
46 | | - template.insert(new Comment("de", "comment 'one'", Vector.of(0.1001f, 0.22345f, 0.33456f, 0.44567f, 0.55678f))); |
47 | | - template.insert(new Comment("de", "comment 'two'", Vector.of(0.2001f, 0.32345f, 0.43456f, 0.54567f, 0.65678f))); |
48 | | - template.insert(new Comment("en", "comment 'three'", Vector.of(0.9001f, 0.82345f, 0.73456f, 0.64567f, 0.55678f))); |
49 | | - template.insert(new Comment("de", "comment 'four'", Vector.of(0.9001f, 0.92345f, 0.93456f, 0.94567f, 0.95678f))); |
50 | | - } |
51 | | - } |
| 46 | + template.insert(new Comment("de", "comment 'one'", Vector.of(0.1001f, 0.22345f, 0.33456f, 0.44567f, 0.55678f))); |
| 47 | + template.insert(new Comment("de", "comment 'two'", Vector.of(0.2001f, 0.32345f, 0.43456f, 0.54567f, 0.65678f))); |
| 48 | + template.insert(new Comment("en", "comment 'three'", Vector.of(0.9001f, 0.82345f, 0.73456f, 0.64567f, 0.55678f))); |
| 49 | + template.insert(new Comment("de", "comment 'four'", Vector.of(0.9001f, 0.92345f, 0.93456f, 0.94567f, 0.95678f))); |
| 50 | + } |
| 51 | + } |
52 | 52 | } |
0 commit comments