Guest User

Untitled

a guest
Feb 13th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.62 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. compile group: 'org.springframework.session', name: 'spring-session', version: '1.2.0.RELEASE'
  29.  
  30.  
  31.  
  32. compile project(':spring-session'),
  33. "org.springframework.boot:spring-boot-starter-web",
  34. "org.springframework.boot:spring-boot-starter-thymeleaf",
  35. "nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect",
  36. "org.springframework.security:spring-security-web:$springSecurityVersion",
  37. "org.springframework.security:spring-security-config:$springSecurityVersion",
  38. "com.maxmind.geoip2:geoip2:2.3.1",
  39. "org.apache.httpcomponents:httpclient"
  40.  
  41. testCompile "org.springframework.boot:spring-boot-starter-test",
  42. "org.assertj:assertj-core:$assertjVersion"
  43.  
  44. integrationTestCompile gebDependencies,
  45. "org.spockframework:spock-spring:$spockVersion"
  46.  
  47. }
  48.  
  49.  
  50.  
  51. def reservePort() {
  52. def socket = new ServerSocket(0)
  53. def result = socket.localPort
  54. socket.close()
  55. result
  56. }
  57.  
  58. spring.datasource.url = jdbc:mysql://localhost:3306/TEST?characterEncoding=UTF-8&useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
  59. spring.datasource.driverClassName = com.mysql.jdbc.Driver
  60. spring.datasource.username=root
  61. spring.datasource.password=but
  62.  
  63. spring.thymeleaf.cache=false
  64. spring.template.cache=false
  65.  
  66. @EnableJdbcHttpSession // <1>
  67. public class HttpSessionConfig {
  68. }
  69.  
  70. Whitelabel Error Page
  71.  
  72. This application has no explicit mapping for /error, so you are seeing this as a fallback.
  73.  
  74. Mon May 23 21:14:31 CEST 2016
  75. There was an unexpected error (type=Internal Server Error, status=500).
  76. 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
Add Comment
Please, Sign In to add comment