Examples of LocalSessionFactoryBean


Examples of org.springframework.orm.hibernate4.LocalSessionFactoryBean

        super();
    }

    @Bean
    public LocalSessionFactoryBean sessionFactory() {
        final LocalSessionFactoryBean sessionFactory = new LocalSessionFactoryBean();
        sessionFactory.setDataSource(restDataSource());
        sessionFactory.setHibernateProperties(hibernateProperties());

        // sessionFactory.setPackagesToScan(new String[] { "org.baeldung.ex.mappingexception.cause2.persistence.model" });
        sessionFactory.setAnnotatedClasses(new Class[] { Foo.class });

        return sessionFactory;
    }
View Full Code Here

Examples of org.springframework.orm.hibernate4.LocalSessionFactoryBean

        super();
    }

    @Bean
    public LocalSessionFactoryBean sessionFactory() {
        final LocalSessionFactoryBean sessionFactory = new LocalSessionFactoryBean();
        sessionFactory.setDataSource(restDataSource());
        sessionFactory.setHibernateProperties(hibernateProperties());

        // sessionFactory.setPackagesToScan(new String[] { "org.baeldung.ex.mappingexception.cause2.persistence.model" });
        // sessionFactory.setAnnotatedClasses(new Class[] { Foo.class });

        return sessionFactory;
View Full Code Here

Examples of org.springframework.orm.hibernate4.LocalSessionFactoryBean

        super();
    }

    @Bean
    public LocalSessionFactoryBean sessionFactory() {
        final LocalSessionFactoryBean sessionFactory = new LocalSessionFactoryBean();
        sessionFactory.setDataSource(restDataSource());
        sessionFactory.setPackagesToScan(new String[] { "org.baeldung.persistence.model" });
        sessionFactory.setHibernateProperties(hibernateProperties());

        return sessionFactory;
    }
View Full Code Here

Examples of org.springframework.orm.hibernate4.LocalSessionFactoryBean

        super();
    }

    @Bean
    public LocalSessionFactoryBean sessionFactory() {
        final LocalSessionFactoryBean sessionFactory = new LocalSessionFactoryBean();
        sessionFactory.setDataSource(restDataSource());
        sessionFactory.setPackagesToScan(new String[] { "org.baeldung.spring.persistence.model" });
        sessionFactory.setHibernateProperties(hibernateProperties());

        return sessionFactory;
    }
View Full Code Here

Examples of org.springframework.orm.hibernate4.LocalSessionFactoryBean

        super();
    }

    @Bean
    public LocalSessionFactoryBean sessionFactory() {
        final LocalSessionFactoryBean sessionFactory = new LocalSessionFactoryBean();
        sessionFactory.setDataSource(restDataSource());
        sessionFactory.setPackagesToScan(new String[] { "org.baeldung.persistence.model" });
        sessionFactory.setHibernateProperties(hibernateProperties());

        return sessionFactory;
    }
View Full Code Here

Examples of org.springframework.orm.hibernate4.LocalSessionFactoryBean

      return dataSource;
    }

    @Bean
    public LocalSessionFactoryBean sessionFactory() throws Exception {
      LocalSessionFactoryBean sessionFactory = new LocalSessionFactoryBean();
      sessionFactory.setDataSource( dataSource() );
      sessionFactory.setPackagesToScan( "com.foreach.across.test.modules.hibernate1",
                                        "com.foreach.across.test.modules.hibernate2" );

      Properties p = new Properties();
      p.setProperty( "hibernate.hbm2ddl.auto", "create-drop" );

      sessionFactory.setHibernateProperties( p );

      return sessionFactory;
    }
View Full Code Here

Examples of org.springframework.orm.hibernate4.LocalSessionFactoryBean

    return new PropertySourcesPlaceholderConfigurer();
  }

  @Bean
  public LocalSessionFactoryBean sessionFactory() {
    final LocalSessionFactoryBean sessionFactory = new LocalSessionFactoryBean();
    sessionFactory.setDataSource(dataSource());
    sessionFactory.setPackagesToScan("ua.ck.geekhub.entity");
    sessionFactory.setHibernateProperties( hibernateProperties );
    return sessionFactory;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.