I'm trying to setup a very simple Springboot application using Thymeleaf as my templating engine. I am %100 certain my @Controller is working fine but when I try to access the default url ("/") I get the dreaded "Whitelabel" error page.
Below is my gradle.build file...
buildscript {
ext { springBootVersion = '1.4.0.RELEASE' }
repositories { mavenCentral() }
dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") }
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'spring-boot'
jar {
baseName = 'masterSpringMvc'
version = '0.0.1-SNAPSHOT'
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories { mavenCentral() }
dependencies {
compile('org.springframework.boot:spring-boot-starter-web')
compile('org.springframework.boot:spring-boot-starter-thymeleaf')
testCompile('org.springframework.boot:spring-boot-starter-test')
}
eclipse {
classpath {
containers.remove('org.eclipse.jdt.launching.JRE_CONTAINER')
containers 'org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8'
}
Pretty sure I got everything setup right, so I go ahead and run the below build steps...
After this I am expecting to see the spring-boot-starter-thymeleaf.jar in my "Project and External Dependencies" but its not there. I'm very new to Gradle and was assuming that the build would pull in this required dependency, and then it would be "enabled" while starting my application. Any clue what I might be doing wrong here?
Here is my .html page, I am expecting to see "Test" displayed in the browser.
You need to update dependencies. On Package Explorer: -> right click your project -> Gradle ->Enable Dependency Management -> right click it again -> Refresh Dependencies
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With