質問編集履歴

4

githubリンク

2018/11/24 17:10

投稿

sanezane
sanezane

スコア91

test CHANGED
File without changes
test CHANGED
@@ -248,4 +248,4 @@
248
248
 
249
249
  11月25日
250
250
 
251
- [github](https://github.com/yosuke0517/Mrs)
251
+ [githubリンク](https://github.com/yosuke0517/Mrs)

3

githubへソースコードコミット

2018/11/24 17:09

投稿

sanezane
sanezane

スコア91

test CHANGED
File without changes
test CHANGED
@@ -6,6 +6,8 @@
6
6
 
7
7
 
8
8
 
9
+
10
+
9
11
  ### エラー内容
10
12
 
11
13
  ```ここに言語を入力
@@ -241,3 +243,9 @@
241
243
  テーブル一覧キャプチャ追加
242
244
 
243
245
  ![イメージ説明](6bb349c5a2e5c4e52b01862df3ce0f47.png)
246
+
247
+
248
+
249
+ 11月25日
250
+
251
+ [github](https://github.com/yosuke0517/Mrs)

2

findOne呼出しクラスを追加

2018/11/24 17:08

投稿

sanezane
sanezane

スコア91

test CHANGED
File without changes
test CHANGED
@@ -172,6 +172,62 @@
172
172
 
173
173
  ```
174
174
 
175
+ ```ReservationUserDetailsService
176
+
177
+ package mrs.domain.service.user;
178
+
179
+
180
+
181
+ import mrs.domain.model.User;
182
+
183
+ import mrs.domain.repository.user.UserRepository;
184
+
185
+ import org.springframework.beans.factory.annotation.Autowired;
186
+
187
+ import org.springframework.security.core.userdetails.UserDetails;
188
+
189
+ import org.springframework.security.core.userdetails.UserDetailsService;
190
+
191
+ import org.springframework.security.core.userdetails.UsernameNotFoundException;
192
+
193
+ import org.springframework.stereotype.Service;
194
+
195
+
196
+
197
+ @Service
198
+
199
+ public class ReservationUserDetailsService implements UserDetailsService {
200
+
201
+ @Autowired
202
+
203
+ UserRepository userRepository;
204
+
205
+
206
+
207
+ @Override
208
+
209
+ public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
210
+
211
+ User user = userRepository.findOne(username);
212
+
213
+ if (user == null) {
214
+
215
+ throw new UsernameNotFoundException(username + " is not found.");
216
+
217
+ }
218
+
219
+ return new ReservationUserDetails(user);
220
+
221
+ }
222
+
223
+ }
224
+
225
+
226
+
227
+ ```
228
+
229
+
230
+
175
231
 
176
232
 
177
233
  宜しくお願い致します。

1

テーブル一覧キャプチャ追加

2018/11/24 14:20

投稿

sanezane
sanezane

スコア91

test CHANGED
File without changes
test CHANGED
@@ -175,3 +175,13 @@
175
175
 
176
176
 
177
177
  宜しくお願い致します。
178
+
179
+
180
+
181
+
182
+
183
+ ■追加情報
184
+
185
+ テーブル一覧キャプチャ追加
186
+
187
+ ![イメージ説明](6bb349c5a2e5c4e52b01862df3ce0f47.png)