{"id":1340,"date":"2017-11-13T15:23:29","date_gmt":"2017-11-13T06:23:29","guid":{"rendered":"https:\/\/www.rocher.kyoto.jp\/arbr\/?p=1340"},"modified":"2017-11-13T15:23:29","modified_gmt":"2017-11-13T06:23:29","slug":"spring-security%e3%81%ae%e3%83%a6%e3%83%bc%e3%82%b6%e8%aa%8d%e8%a8%bc%e3%81%a7%e3%81%a1%e3%82%87%e3%81%93%e3%81%a3%e3%81%a8%e8%ba%93%e3%81%84%e3%81%9f","status":"publish","type":"post","link":"https:\/\/www.rocher.kyoto.jp\/arbr\/?p=1340","title":{"rendered":"Spring Security\u306e\u30e6\u30fc\u30b6\u8a8d\u8a3c\u3067\u3061\u3087\u3053\u3063\u3068\u8e93\u3044\u305f"},"content":{"rendered":"<p>DB\u8a8d\u8a3c\u3092\u8a2d\u5b9a\u3057\u3088\u3046\u3068\u3057\u3066<\/p>\n<blockquote><p>@Entity<br \/>\npublic class <strong><span style=\"color: #ff0000;\">User<\/span><\/strong> implements UserDetails {<\/p>\n<p>private static final long serialVersionUID = 1L;<\/p>\n<p>public enum Authority {ROLE_USER, ROLE_ADMIN}<\/p>\n<p>@Id<br \/>\n@GeneratedValue(strategy = GenerationType.AUTO)<br \/>\nprivate Long id;<\/p>\n<p>@Column(nullable = false, unique = true)<br \/>\nprivate String username;<\/p>\n<p>@Column(nullable = false)<br \/>\nprivate String password;<\/p><\/blockquote>\n<p>User\u3068\u3044\u3046\u30af\u30e9\u30b9\u540d\u3067\u30c6\u30fc\u30d6\u30eb\u306e\u751f\u6210\u3092\u3057\u3088\u3046\u3068\u3057\u305f\u3089\u3001\u4ee5\u4e0b\u306e\u30a8\u30e9\u30fc\u304c\u767a\u751f<\/p>\n<blockquote><p>Caused by: org.postgresql.util.PSQLException: <span style=\"color: #ff0000;\">ERROR: syntax error at or near &#8220;user&#8221;Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near &#8220;user&#8221;<\/span>\u00a0 \u30dd\u30b8\u30b7\u30e7\u30f3: 13 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2455) ~[postgresql-9.4.1212.jre7.jar:9.4.1212.jre7] at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2155) ~[postgresql-9.4.1212.jre7.jar:9.4.1212.jre7] at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:288) ~[postgresql-9.4.1212.jre7.jar:9.4.1212.jre7] at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:430) ~[postgresql-9.4.1212.jre7.jar:9.4.1212.jre7] at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:356) ~[postgresql-9.4.1212.jre7.jar:9.4.1212.jre7]<\/p><\/blockquote>\n<p>Postgres\u306e\u4e88\u7d04\u8a9e\u3068\u304b\u3055\u306a\u3063\u305f\u3068\u306e\u3053\u3068\u3002<a href=\"https:\/\/stackoverflow.com\/questions\/45896640\/org-postgresql-util-psqlexception-error-syntax-error-at-or-near-user-in-case\">\u30ea\u30f3\u30af\u5148<\/a>\u306e\u3068\u308a\u3042\u3048\u305a\u306e\u624b\u6bb5\u3068\u3057\u3066\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30a8\u30b9\u30b1\u30fc\u30d7\u3092\u4e8c\u91cd\u306b\u3057\u305f\u3089\u52d5\u3044\u305f\u3002\uff08password\u5217\u3082\u5fc5\u8981\u3068\u306e\u3053\u3068\uff09<\/p>\n<blockquote><p>@Entity<br \/>\n<strong><span style=\"color: #ff0000;\">@Table(name = &#8220;`USER`&#8221;)<\/span><\/strong><br \/>\npublic class User implements UserDetails {<\/p><\/blockquote>\n<p>\u305f\u3060\u3001\u305d\u3082\u305d\u3082\u4e88\u7d04\u8a9e\u3068\u91cd\u306a\u3089\u306a\u3044\u307b\u3046\u304c\u3088\u3044\u3088\u3068\u3044\u3046\u3053\u3068\u306a\u306e\u3067\u5f8c\u3067\u5909\u3048\u308b<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>DB\u8a8d\u8a3c\u3092\u8a2d\u5b9a\u3057\u3088\u3046\u3068\u3057\u3066 @Entity public class User implements UserDetails { private static final long serialVersionUID =  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[94],"tags":[98,99],"class_list":["post-1340","post","type-post","status-publish","format-standard","hentry","category-spring","tag-postgresql","tag-springboot"],"_links":{"self":[{"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=\/wp\/v2\/posts\/1340","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1340"}],"version-history":[{"count":1,"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=\/wp\/v2\/posts\/1340\/revisions"}],"predecessor-version":[{"id":1341,"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=\/wp\/v2\/posts\/1340\/revisions\/1341"}],"wp:attachment":[{"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1340"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1340"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rocher.kyoto.jp\/arbr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1340"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}