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 Spring Basics Spring Components and Configuring Our App Adding a Spring Configuration File

Brendan Whiting
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Brendan Whiting
Front End Web Development Techdegree Graduate 84,738 Points

I don’t have an ‘application’ folder under Gradle projects > giflib >Tasks. What am I doing wrong?

Here is a screenshot of my Gradle projects sidebar: http://imgur.com/a/rTzwc In the video at 2:55 there is an application folder with a bootRun file that we need to go forward that I don’t have. What do I need to do?

AppConfig.java

package com.teamtreehouse.giflib;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;

@EnableAutoConfiguration
public class AppConfig {
public static void main(String[] args) {
SpringApplication.run(AppConfig.class, args);
}
}

build.gradle

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

buildscript {
    repositories {
        mavenCentral()
    }

    dependencies {
        classpath 'org.springframework.boot:spring-boot-gradle-plugin:1.2.6.RELEASE'
    }
}

apply plugin: 'java'
apply plugin: 'spring-boot'

sourceCompatibility = 1.5

repositories {
    mavenCentral()
}

dependencies {
    compile 'org.springframework.boot:spring-boot-starter-web:1.2.6.RELEASE'
}

```
Alka Gupta
Alka Gupta
706 Points

I am getting similar error hence no application folder.

Gradle 'giflib' project refresh failed Error:The supplied build action failed with an exception.

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

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'org.springframework.boot:spring-boot-gradle-plugin:1.2.6.RELEASE'
    }
}

apply plugin: 'java'
apply plugin: 'spring-boot'

sourceCompatibility = 1.5

repositories {
    mavenCentral()
}

dependencies {
    compile 'org.springframework.boot:spring-boot-starter-web:1.2.6.RELEASE'
}

4 Answers

Seth Kroger
Seth Kroger
56,413 Points

Click the blue refresh icon at the top of the gradle panel. If the application group doesn't show up, are there any error/warning messages?

Seth Kroger
Seth Kroger
56,413 Points

Try checking under "Other".

Seth Kroger
Seth Kroger
56,413 Points

Hmmm... I notice there's an odd Unicode character at the end of your listing for build.gradle that causes an error if I try to include it. try removing any blank lines after the last dependencies block. You can also try running gradle manually in the terminal from the project directory:

# On Windows:
gradlew.bat bootRun

#on Linux/Mac
./gradlew bootRun
Seth Kroger
Seth Kroger
56,413 Points

Woot! Glad it's fixed!

Hello guys, I have same problem, http://prntscr.com/dp3xzf . did some one have idea, for solution? :)

build.gradle file should have last version .. Then refresh external project

its work with me .. :)

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

buildscript {
    repositories{
        mavenCentral()
    }
    dependencies{
        classpath 'org.springframework.boot:spring-boot-gradle-plugin:1.4.3.RELEASE'
    }
}

apply plugin: 'java'
apply plugin: 'spring-boot'

sourceCompatibility = 1.8

repositories {
    mavenCentral()
}

dependencies {
    compile 'org.springframework.boot:spring-boot-starter-web:1.4.3.RELEASE'
}
Bakhtiyar Seidakhmetov
Bakhtiyar Seidakhmetov
11,936 Points

I have same problem. Solved by adding this line, i forgot earlier. Hope it helps smbdy

apply plugin: 'spring-boot'