• Register
Welcome to Kodlogs Q&A, programming questions and answer website.

Most popular tags

java program python php javascript android c# r spring c mysql eclipse arrays python-3 exception tomcat ggplot2 spring-boot numpy html sql-server jdbc ssl sockets windows string x python-2 hibernate 7 java-8 intellij-idea ssl-certificate entity-framework macos pandas minecraft ios csv security sql json asp list net class heap-memory for-loop scikit-learn winforms illegalstateexception keytool matlab redirect code program junit pip maven ubuntu loops math facebook datetime jquery cryptography loop int import https tsql fatal-error struts java-applet spring-mvc runtime-error apache-spark pyspark garbage-collection amazon-web-services sql-server-2005 quirks-mode internet-explorer-9 internet-explorer reporting-services anova machine-learning keras indentation-error unit-testing android-studio jupyter-notebook glmnet virtualenv webclient visual-studio-2010 webpack compiler-errors numpy-ndarray curl vagrant aspnet reporting dataframe nullpointerexception javafx tensorflow jsp django jpa docker wordpress servlet indentation xcode typeerror scanner sum deployment socketexception git linux certificate css util oracle cmd node recursion search tcp syntax connection float httpwebrequest js main function number file html5 spring-data-jpa softmax elastic-beanstalk google-sheets-api google-spreadsheet-api cnf minidump xuggler acumatica gitlab elasticsearch-5 elasticsearch app-transport-security ios10 ios9 cdn cloudflare wampserver plpgsql salt-stack sysv parent-child android-edittext textview visual-studio-2012 android-workmanager unique-index unity2d unity3d electron theano maven-compiler-plugin pickle assetbundle rstudio bar-chart python-tesseract tomcat6 primefaces solr easymock jvm-crash tomcat7 apache-httpclient-4 web-services woodstox discord jersey-2 prepared-statement resultset sencha-cmd sencha-touch-2 sencha-touch powermock fips apex x509certificate ibm-bpm websphere-7 file-permissions file-io accesscontrolexception grizzly atmosphere slick2d lwjgl informetica twitter-bootstrap-3 jax-rs resteasy spring-security-kerberos spring-security kerberos long-integer mapnik pytorch git-review vpython continuation homebrew xgboost conda visual-studio android-asynctask stack-trace user-interface jaxws-maven-plugin maven-3 maven-2 browser-notsupportedexception google-maps-api-3 google-maps visual-studio-code truststore firebase-authentication aws-organizations php-7 string-formatting cplusplus visual-studio-2015 net-core net-mvc msbuild extension-methods foreign-keys windows-services react-redux reactjs inputstream facebook-graph-api entity-framework-4 reportingservices-2005 mips linear-regression deep-learning block-device melt reshape2 floating-point webpack-dev-server javascrip 0-lollipop android-5 statsmodels avx eclipseide javafx-2 php-not-recognized laravel command-line tinyurl classnotfoundexception atom-editor android-emulator android-sdk-tools ionic2 cordova foobar2k tcplistener net-2 net-4 ole-db-provider export-to-excel openrowset windows-10 vagrantfile jvm-arguments global-variables orm autopostback classformatexception eof upstart qt ipv4 graphviz pydot atom curses unityeditor pandoc tesseract xls oledb redux spotify cxf wamp nio stacked prediction headless hyperlink outlook jackson keystore applicationcontext pipeline iis jstl encryption perfect-square objective-c carthage xcode8 indexing standard-deviation sudo xampp postgresql connector apple mdf kubernetes destructor gettime arithmeticexception gmail ioexception heuristics milliseconds disk cpu npm modx-revolution goldsky modx prevnext javascript-dictionary stack-smashing device-monitor radio-button android-actionbaractivity android-activity android-fragments java-long unqualified-id ora-12154 javc c++ java nullpointerexception runtime-error drjava awt-eventqueue dsx math-pow ajquery nosuchelementexception appcompatactivity jsf jtextfield awt jpanel inputmismatchexception glassfish deque jupyter flask lvalue gradle servlets netbeans simulation ibm factorial javax apache boot opengl virtualbox jvm margins 2147483647 mongodb cloud firebase plot plugins github processor automation crash card pointers editor concatenation formatting debugging devices module testing color arraylist sequence nested date caching expected build response ip directory algorithms release collections print figure casting url expression validation integer microsoft sorting sort read types replace rest ajax exe excel dictionary message required database text variable time size dll system files table runtime static random code web map http error version 0 2 my
+1 vote
237 views

How to resolve Spring Boot web application error "Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback."

Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Thu Feb 09 01:53:26 CET 2017
There was an unexpected error (type=Not Found, status=404).
No message available
by (1.5k points)  
reshown by

4 Answers

0 votes
Lets assume  that point one conceivable issue would be that the beneath class wouldn't had been made

For HTML pages utilize the beneath class

import org.springframework.context.annotation.Bean;

import org.springframework.context.annotation.Configuration;

import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer;

import org.springframework.web.servlet.config.annotation.EnableWebMvc;

import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import org.springframework.web.servlet.view.InternalResourceViewResolver;

@Configuration

@EnableWebMvc

open class ApplicationWebMvcConfig expands WebMvcConfigurerAdapter{

@Override

open void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {

configurer.enable();

}

@Bean

open InternalResourceViewResolver viewResolver() {

InternalResourceViewResolver resolver = new InternalResourceViewResolver();

resolver.setPrefix("/WEB-INF/html/");

resolver.setSuffix(".html");

return resolver;

}

}

For JSP pages utilize the underneath class

import org.springframework.context.annotation.Bean;

import org.springframework.context.annotation.Configuration;

import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer;

import org.springframework.web.servlet.config.annotation.EnableWebMvc;

import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import org.springframework.web.servlet.view.InternalResourceViewResolver;

@Configuration

@EnableWebMvc

open class ApplicationWebMvcConfig expands WebMvcConfigurerAdapter{

@Override

open void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {

configurer.enable();

}

@Bean

open InternalResourceViewResolver viewResolver() {

InternalResourceViewResolver resolver = new InternalResourceViewResolver();

resolver.setPrefix("/WEB-INF/jsp/");

resolver.setSuffix(".jsp");

return resolver;

}

}
by (8.9k points)  
0 votes

It would appear that they now exclude the spring-boot-starter-web reliance, so include it physically.

dependencies {
    compile group: 'org.springframework.boot', name: 'spring-boot-starter-thymeleaf', version: '2.0.0.RELEASE'
    compile group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: '2.0.0.RELEASE'
}
by (8.9k points)  
0 votes
About special case: This application has no unequivocal mapping for/blunder, so you are considering this to be a fallback.

The area of the Application startup class is wrong. To put the Application class on the furthest side, that is, to incorporate all sub-bundles

Cause: Spring-boot will naturally stack all segments under the bundle of the startup class and its sub-bundles.

In the springboot design record: application.yml or application.properties about the arrangement of the view resolver:

At the point when the spring-boot-starter-paren form under the pom record is high:

spring.mvc.view.prefix/spring.mvc.view.suffix (springBoot made as a matter of course utilizes this mode)

At the point when the spring-boot-starter-paren form under the pom record is low:

spring.view.prefix/spring.view.suffix

Controller URL way composing issue

@RequestMapping("xxxxxxxxxxxxxx")

The genuine access way does not coordinate "xxx". [You can pass judgment on the accuracy of the way by yielding a sentence in the controller]

On the off chance that your task is springBoot, the best approach to bundle it is as war bundle, the arrival estimation of the controller is a string, you have to discover the parse into jsp page, you should focus on pom Whether the tomcat-implant jasper reliance is added to the record
by (8.9k points)  
0 votes
dependency reuired to solve issue:

<dependency>
    <groupId>org.springframework.boot</groupId>

    <artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
by (8.9k points)  
...