Skip to content

Commit

Permalink
H2 web server started in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nurkiewicz committed Nov 9, 2011
1 parent 067c4ca commit a661da3
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -20,6 +20,7 @@ import org.springframework.dao.annotation.PersistenceExceptionTranslationPostPro
import org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor
import org.springframework.context.annotation._
import org.hibernate.cfg.ImprovedNamingStrategy
import org.h2.tools.Server

/**
* @author Tomasz Nurkiewicz
Expand Down Expand Up @@ -80,4 +81,7 @@ class SpringConfiguration {
@Bean
def persistenceAnnotationBeanPostProcessor() = new PersistenceAnnotationBeanPostProcessor()

@Bean(initMethod = "start", destroyMethod = "stop")
def h2WebServer() = Server.createWebServer("-webDaemon", "-webAllowOthers")

}

0 comments on commit a661da3

Please sign in to comment.