Advertisement
Guest User

Untitled

a guest
May 23rd, 2016
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.52 KB | None | 0 0
  1. buildscript {
  2. repositories {
  3. mavenCentral()
  4. }
  5. dependencies {
  6. classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion")
  7. }
  8. }
  9.  
  10. apply plugin: 'spring-boot'
  11.  
  12. apply from: JAVA_GRADLE
  13.  
  14.  
  15. //this 'if' statement is because I was getting error: Execution failed for task ':samples:findbyusername:findMainClass'.
  16. //> Could not find property 'main' on task ':samples:findbyusername:run'.
  17. if (!hasProperty('mainClass')) {
  18. ext.mainClass = 'sample.FindByUsernameApplication'
  19. }
  20.  
  21. tasks.findByPath("artifactoryPublish")?.enabled = false
  22.  
  23. group = 'samples'
  24.  
  25. dependencies {
  26. compile("org.springframework.boot:spring-boot-starter-jdbc:$springBootVersion")
  27. compile group: 'mysql', name: 'mysql-connector-java', version: '6.0.2'
  28.  
  29. compile project(':spring-session'),
  30. "org.springframework.boot:spring-boot-starter-web",
  31. "org.springframework.boot:spring-boot-starter-thymeleaf",
  32. "nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect",
  33. "org.springframework.security:spring-security-web:$springSecurityVersion",
  34. "org.springframework.security:spring-security-config:$springSecurityVersion",
  35. "com.maxmind.geoip2:geoip2:2.3.1",
  36. "org.apache.httpcomponents:httpclient"
  37.  
  38. testCompile "org.springframework.boot:spring-boot-starter-test",
  39. "org.assertj:assertj-core:$assertjVersion"
  40.  
  41. integrationTestCompile gebDependencies,
  42. "org.spockframework:spock-spring:$spockVersion"
  43.  
  44. }
  45.  
  46.  
  47.  
  48. def reservePort() {
  49. def socket = new ServerSocket(0)
  50. def result = socket.localPort
  51. socket.close()
  52. result
  53. }
  54.  
  55. spring.datasource.url = jdbc:mysql://localhost:3306/TEST?characterEncoding=UTF-8&useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
  56. spring.datasource.driverClassName = com.mysql.jdbc.Driver
  57. spring.datasource.username=root
  58. spring.datasource.password=but
  59.  
  60. spring.thymeleaf.cache=false
  61. spring.template.cache=false
  62.  
  63. @EnableJdbcHttpSession // <1>
  64. public class HttpSessionConfig {
  65. }
  66.  
  67. Whitelabel Error Page
  68.  
  69. This application has no explicit mapping for /error, so you are seeing this as a fallback.
  70.  
  71. Mon May 23 21:14:31 CEST 2016
  72. There was an unexpected error (type=Internal Server Error, status=500).
  73. PreparedStatementCallback; bad SQL grammar [INSERT INTO SPRING_SESSION(SESSION_ID, CREATION_TIME, LAST_ACCESS_TIME, MAX_INACTIVE_INTERVAL, PRINCIPAL_NAME) VALUES (?, ?, ?, ?, ?)]; nested exception is java.sql.SQLSyntaxErrorException: Table 'test.spring_session' doesn't exist
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement