Tabnine Logo
AnnotationSessionFactoryBean.setPackagesToScan
Code IndexAdd Tabnine to your IDE (free)

How to use
setPackagesToScan
method
in
org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean

Best Java code snippets using org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean.setPackagesToScan (Showing top 6 results out of 315)

origin: stackoverflow.com

AnnotationSessionFactoryBean annotationSessionFactoryBean = new AnnotationSessionFactoryBean();
  annotationSessionFactoryBean.setPackagesToScan(new String[]{"com.sample"});
origin: spring-projects/spring-framework-issues

@Bean
public SessionFactory sessionFactory() throws Exception
{
  AnnotationSessionFactoryBean bean = new AnnotationSessionFactoryBean();
  bean.setDataSource(dataSource());
  bean.setPackagesToScan(new String[] {"org.springframework.issues"});
  bean.setHibernateProperties(hibernateProps());
  bean.afterPropertiesSet();
  return bean.getObject();
}
origin: stackoverflow.com

 AnnotationSessionFactoryBean sfb = new AnnotationSessionFactoryBean();
sfb.setDataSource( ds );
sfb.setHibernateProperties( hibProps);
sfb.setPackagesToScan( ... );
sfb.initialise();
SessionFactory sf = sfb.getObject();
origin: spring-projects/spring-framework-issues

@Bean
public SessionFactory sessionFactory() throws Exception
{
  AnnotationSessionFactoryBean bean = new AnnotationSessionFactoryBean();
  bean.setDataSource(dataSource());
  bean.setPackagesToScan(new String[] {"org.springframework.issues"});
  bean.setHibernateProperties(hibernateProps());
  bean.afterPropertiesSet();
  return bean.getObject();
}
origin: stackoverflow.com

 @Configuration
//@ComponentScan(basePackages = "de.webapp.daocustomer", excludeFilters = {@ComponentScan.Filter(Configuration.class), @ComponentScan.Filter(Controller.class)})
@ImportResource({"classpath*:componentScan.xml","classpath*:properties-config.xml","classpath*:security-context.xml"})
public class AppConfig
{
...
@Bean
public SessionFactory sessionFactory() throws Exception
{
  AnnotationSessionFactoryBean bean = new AnnotationSessionFactoryBean();
  bean.setDataSource(dataSource());
  bean.setPackagesToScan(new String[] {"de.webapp"});
  bean.setHibernateProperties(hibernateProps());
  bean.afterPropertiesSet();
  return bean.getObject();
}
origin: stackoverflow.com

sessionFactory.setDataSource(dataSource());
String[] pckage={"com.argus.intenew"};
sessionFactory.setPackagesToScan(pckage);  
sessionFactory.setHibernateProperties(hibProperties());
return sessionFactory; 
org.springframework.orm.hibernate3.annotationAnnotationSessionFactoryBeansetPackagesToScan

Javadoc

Specify packages to search using Spring-based scanning for entity classes in the classpath. This is an alternative to listing annotated classes explicitly.

Default is none. Specify packages to search for autodetection of your entity classes in the classpath. This is analogous to Spring's component-scan feature ( org.springframework.context.annotation.ClassPathBeanDefinitionScanner).

Popular methods of AnnotationSessionFactoryBean

  • <init>
  • setDataSource
  • setHibernateProperties
  • afterPropertiesSet
  • getObject
  • setAnnotatedClasses
  • getHibernateProperties
  • initialise
  • matchesEntityTypeFilter
    Check whether any of the configured entity type filters matches the current class descriptor contain
  • scanPackages
    Perform Spring-based scanning for entity classes.
  • setConfigLocation
  • setConfigLocation

Popular in Java

  • Updating database using SQL prepared statement
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • scheduleAtFixedRate (Timer)
  • setContentView (Activity)
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • JLabel (javax.swing)
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now