Advertisement
Guest User

Untitled

a guest
Aug 10th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.11 KB | None | 0 0
  1. spring.datasource.url=jdbc:h2:mem:dbname
  2. spring.datasource.driverClassName=org.h2.Driver
  3. spring.datasource.username=sa
  4. spring.datasource.password=
  5. spring.jpa.hibernate.ddl-auto=create
  6.  
  7. <dependency>
  8. <groupId>com.h2database</groupId>
  9. <artifactId>h2</artifactId>
  10. <version>1.4.193</version>
  11. </dependency>
  12.  
  13. import org.h2.tools.Server;
  14. ...
  15. // start the TCP Server
  16. server = Server.createTcpServer("-tcpAllowOthers").start();
  17. ...
  18. // stop the TCP Server
  19. server.stop();
  20.  
  21. Usage: java org.h2.tools.Server
  22. When running without options, -tcp, -web, -browser and -pg are started.
  23. Options are case sensitive. Supported options are:
  24. [-help] or [-?] Print the list of options
  25. [-web] Start the web server with the H2 Console
  26. [-webAllowOthers] Allow other computers to connect - see below
  27. [-webDaemon] Use a daemon thread
  28. [-webPort ] The port (default: 8082)
  29. [-webSSL] Use encrypted (HTTPS) connections
  30. [-browser] Start a browser connecting to the web server
  31. [-tcp] Start the TCP server
  32. [-tcpAllowOthers] Allow other computers to connect - see below
  33. [-tcpDaemon] Use a daemon thread
  34. [-tcpPort ] The port (default: 9092)
  35. [-tcpSSL] Use encrypted (SSL) connections
  36. [-tcpPassword ] The password for shutting down a TCP server
  37. [-tcpShutdown ""] Stop the TCP server; example: tcp://localhost
  38. [-tcpShutdownForce] Do not wait until all connections are closed
  39. [-pg] Start the PG server
  40. [-pgAllowOthers] Allow other computers to connect - see below
  41. [-pgDaemon] Use a daemon thread
  42. [-pgPort ] The port (default: 5435)
  43. [-properties ""] Server properties (default: ~, disable: null)
  44. [-baseDir ] The base directory for H2 databases (all servers)
  45. [-ifExists] Only existing databases may be opened (all servers)
  46. [-trace] Print additional trace information (all servers)
  47. The options -xAllowOthers are potentially risky.
  48. For details, see Advanced Topics / Protection against Remote Access.
  49. See also http://h2database.com/javadoc/org/h2/tools/Server.html
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement