• singleton (default)
    only one instance per Spring Container
  • prototype
    any number of instances
  • request
    scoped to an HTTP request (web-aware Spring ApplicationContext)
  • session
    scoped to an HTTP session (web-aware Spring ApplicationContext)
  • global-session
    scoped to a global HTTP session (web-aware Spring ApplicationContext)

<bean id=”helloWorld” class=”Hello” scope=”singleton”>
</bean>

<bean id=”helloWorld” scope=”prototype”>
</bean>

Leave a comment

Skills421

Welcome to Skills421, our knowledge repository for all things tech in the 21st century

Let’s connect

Search