Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java

Updated gradle.build + other config for 2020

Gradle.build file:

group 'com.teamtreehouse'
version '1.0-SNAPSHOT'

// Apply the Java plugin (expects src/main/java to be source folder)
apply plugin: 'java'

// Specify the location where our dependencies will be found
repositories {
    mavenCentral()
}

// Specify dependencies
dependencies {
    compile 'org.springframework.boot:spring-boot-starter-thymeleaf:2.0.1.RELEASE'
    compile 'org.springframework.boot:spring-boot-starter-web:2.0.1.RELEASE'
    compile 'org.hashids:hashids:1.0.1'
    compile 'org.springframework:spring-orm:4.2.5.RELEASE'
    compile 'org.hibernate:hibernate-core:5.2.1.Final'
    compile 'org.apache.tomcat:tomcat-dbcp:8.0.32'
    compile 'com.h2database:h2:1.4.191'
}

In addition to the fixing the gradle file, I made a change to the TemplateConfig.java file. I removed this line from the method SpringResourceTemplateResolver:

templateResolver.setApplicationContext();

To fix the applicationcontext I used a guide from intel: https://www.jetbrains.com/help/idea/2018.3/spring-support.html#spring-file-set?utm_source=product&utm_medium=link&utm_campaign=IU&utm_content=2018.3

Please note that I am using the Ultimate Edition (IntelliJ) so you might have to find a different solution for the Community edition.

To get the h2 jar file, go to their website and download it. After you have downloaded the jar file place it in the folder structure.