diff --git a/src/main/java/com/example/cosmos_serversb/models/Users.java b/src/main/java/com/example/cosmos_serversb/models/Users.java index ce99bd2..ee47aac 100644 --- a/src/main/java/com/example/cosmos_serversb/models/Users.java +++ b/src/main/java/com/example/cosmos_serversb/models/Users.java @@ -5,12 +5,14 @@ import javax.inject.Singleton; import com.example.cosmos_serversb.entities.*; +import com.fasterxml.jackson.annotation.JsonIgnore; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.boot.MetadataSources; import org.hibernate.boot.registry.StandardServiceRegistry; import org.hibernate.boot.registry.StandardServiceRegistryBuilder; + @Singleton public class Users { private static Users theInstance = null; @@ -78,8 +80,7 @@ Session session = sessionFactory.openSession(); session.beginTransaction(); - //名前、uId、ユーザーuri、パスワード、アイコンイメージを保存 - User testUser = new User(name, uId, uri, iconImage); + User testUser = new User(name, uId, uri, iconImage);//名前、uId、ユーザーuri、パスワード、アイコンイメージを保存 session.save(testUser); //出力 // List userResult = session.createQuery( "from User" ).list();