страницу ошибки Whitelabel
Это приложение не имеет явного сопоставления для /error, поэтому вы видите это в качестве запасного варианта.
Ср, 21 апреля 11:24:00 IST 2021
Произошла непредвиденная ошибка (type=Not Found, status=404). ошибка. Как я могу решить эту проблему?
Основной класс
Код: Выделить всё
package com.springboot.controller;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
@EntityScan(basePackages="com.springboot.controller.model")
@EnableJpaRepositories(basePackages="com.springboot.controller.Repository")
@SpringBootApplication(scanBasePackages="com.springboot.controller")
public class RestApi {
public static void main(String[] args) {
SpringApplication.run(RestApi.class, args);
}
}
Код: Выделить всё
package com.springboot.controller.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
@RestController
public class LoginController {
@RequestMapping("/login")
@ResponseBody
public ModelAndView checkMVC()
{
ModelAndView mav= new ModelAndView("LoginForm");
return mav;
}
}
Код: Выделить всё
package com.springboot.controller.Repository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Service;
import com.springboot.controller.model.User;
@Service("UserRepo")
public interface UserRepo extends JpaRepository {
String findByEmail(String email);
}
Код: Выделить всё
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
org.springframework.boot
spring-boot-starter-parent
2.4.3
com.springboot.controller
cunsultustoday-web-services
0.0.1-SNAPSHOT
cunsultustoday-web-services
Demo project for Spring Boot
UTF-8
UTF-8
1.8
org.springframework.boot
spring-boot-starter-data-jpa
org.springframework.boot
spring-boot-starter-web
org.apache.tomcat.embed
tomcat-embed-jasper
provided
commons-configuration
commons-configuration
1.9
javax.servlet
jstl
provided
mysql
mysql-connector-java
runtime
org.springframework.boot
spring-boot-starter-test
test
org.springframework.boot
spring-boot-starter-data-redis
io.lettuce
lettuce-core
redis.clients
jedis
org.springframework
spring-webmvc
org.springframework.boot
spring-boot-maven-plugin
Код: Выделить всё
:: Spring Boot :: (v2.4.3)
2021-04-21 11:23:50.952 INFO 13080 --- [ main] com.springboot.controller.RestApi : Starting RestApi using Java 15.0.2 on Dell with PID 13080 (C:\Users\Ins\Desktop\Project\CunsultUsToday\CunsultUsToday\target\classes started by Ins in C:\Users\Ins\Desktop\Project\CunsultUsToday\CunsultUsToday)
2021-04-21 11:23:50.955 INFO 13080 --- [ main] com.springboot.controller.RestApi : No active profile set, falling back to default profiles: default
2021-04-21 11:23:51.546 INFO 13080 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!
2021-04-21 11:23:51.546 INFO 13080 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2021-04-21 11:23:51.604 INFO 13080 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 48 ms. Found 3 JPA repository interfaces.
2021-04-21 11:23:51.795 INFO 13080 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!
2021-04-21 11:23:51.796 INFO 13080 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode.
2021-04-21 11:23:51.816 INFO 13080 --- [ main] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface com.springboot.controller.Repository.ClgRegRepo. If you want this repository to be a Redis repository, consider annotating your entities with one of these annotations: org.springframework.data.redis.core.RedisHash (preferred), or consider extending one of the following types with your repository: org.springframework.data.keyvalue.repository.KeyValueRepository.
2021-04-21 11:23:51.817 INFO 13080 --- [ main] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface com.springboot.controller.Repository.StudentRegRepo. If you want this repository to be a Redis repository, consider annotating your entities with one of these annotations: org.springframework.data.redis.core.RedisHash (preferred), or consider extending one of the following types with your repository: org.springframework.data.keyvalue.repository.KeyValueRepository.
2021-04-21 11:23:51.818 INFO 13080 --- [ main] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface com.springboot.controller.Repository.UserRepo. If you want this repository to be a Redis repository, consider annotating your entities with one of these annotations: org.springframework.data.redis.core.RedisHash (preferred), or consider extending one of the following types with your repository: org.springframework.data.keyvalue.repository.KeyValueRepository.
2021-04-21 11:23:51.818 INFO 13080 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 11 ms. Found 0 Redis repository interfaces.
2021-04-21 11:23:52.325 INFO 13080 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2021-04-21 11:23:52.342 INFO 13080 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2021-04-21 11:23:52.343 INFO 13080 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.43]
2021-04-21 11:23:52.698 INFO 13080 --- [ main] org.apache.jasper.servlet.TldScanner : At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
2021-04-21 11:23:52.709 INFO 13080 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2021-04-21 11:23:52.709 INFO 13080 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1688 ms
2021-04-21 11:23:52.881 INFO 13080 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2021-04-21 11:23:52.940 INFO 13080 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.4.28.Final
2021-04-21 11:23:53.087 INFO 13080 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2021-04-21 11:23:53.206 INFO 13080 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2021-04-21 11:23:53.377 INFO 13080 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2021-04-21 11:23:53.396 INFO 13080 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
2021-04-21 11:23:54.035 INFO 13080 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2021-04-21 11:23:54.044 INFO 13080 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2021-04-21 11:23:54.556 WARN 13080 --- [ main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2021-04-21 11:23:54.651 INFO 13080 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2021-04-21 11:23:54.990 INFO 13080 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2021-04-21 11:23:54.998 INFO 13080 --- [ main] com.springboot.controller.RestApi : Started RestApi in 4.441 seconds (JVM running for 5.327)
2021-04-21 11:24:00.446 INFO 13080 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2021-04-21 11:24:00.446 INFO 13080 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2021-04-21 11:24:00.447 INFO 13080 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 0 ms
Пожалуйста, помогите.
В журнале нет ошибок.
В журнале ошибок нет, но я все равно получаю эту страницу с ошибкой whitelabel
Пожалуйста, помогите.
п>
Подробнее здесь: https://stackoverflow.com/questions/671 ... ion-has-no