I get the console message below when running my application but every time I navigate to http://localhost:8080/? I get an error message saying:
"Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Tue Jan 12 22:04:40 EST 2021
There was an unexpected error (type=Not Found, status=404)"
Console Output:
2021-01-12 22:03:17.212 INFO 21710 --- [ main] com.crd.carrental.CarRentalApplication : No active profile set, falling back to default profiles: default
2021-01-12 22:03:18.343 INFO 21710 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2021-01-12 22:03:18.350 INFO 21710 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2021-01-12 22:03:18.350 INFO 21710 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.39]
2021-01-12 22:03:18.424 INFO 21710 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2021-01-12 22:03:18.424 INFO 21710 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1073 ms
2021-01-12 22:03:18.539 INFO 21710 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'clientInboundChannelExecutor'
2021-01-12 22:03:18.542 INFO 21710 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'clientOutboundChannelExecutor'
2021-01-12 22:03:18.548 INFO 21710 --- [ main] o.s.s.c.ThreadPoolTaskScheduler : Initializing ExecutorService 'messageBrokerTaskScheduler'
2021-01-12 22:03:18.613 INFO 21710 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'brokerChannelExecutor'
2021-01-12 22:03:19.539 INFO 21710 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2021-01-12 22:03:19.541 INFO 21710 --- [ main] o.s.m.s.b.SimpleBrokerMessageHandler : Starting...
2021-01-12 22:03:19.541 INFO 21710 --- [ main] o.s.m.s.b.SimpleBrokerMessageHandler : BrokerAvailabilityEvent[available=true, SimpleBrokerMessageHandler [DefaultSubscriptionRegistry[cache[0 destination(s)], registry[0 sessions]]]]
2021-01-12 22:03:19.541 INFO 21710 --- [ main] o.s.m.s.b.SimpleBrokerMessageHandler : Started.
2021-01-12 22:03:19.551 INFO 21710 --- [ main] com.crd.carrental.CarRentalApplication : Started CarRentalApplication in 2.977 seconds (JVM running for 5.797)
2021-01-12 22:04:18.616 INFO 21710 --- [MessageBroker-1] o.s.w.s.c.WebSocketMessageBrokerStats : WebSocketSession[0 current WS(0)-HttpStream(0)-HttpPoll(0), 0 total, 0 closed abnormally (0 connect failure, 0 send limit, 0 transport error)], stompSubProtocol[processed CONNECT(0)-CONNECTED(0)-DISCONNECT(0)], stompBrokerRelay[null], inboundChannel[pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0], outboundChannel[pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0], sockJsScheduler[pool size = 1, active threads = 1, queued tasks = 0, completed tasks = 0]
2021-01-12 22:04:23.920 INFO 21710 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2021-01-12 22:04:23.920 INFO 21710 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2021-01-12 22:04:23.929 INFO 21710 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 9 ms```
Make sure you have defined a Controller for the requested url "/" as below:
#RequestMapping("/")
public String homePage() {
... <your code>
return "home";
}
And, your home page have to be stored in below path:
|--resources
|--templates
|--home.html
white label error comes when there no page for that URL, you are searching. so in your controller see whether there is a mapping for "/".
The White Error label is the expected behavior of an empty Spring application without any Controller Path. Unless you haven't configured any REST path or endpoint, this error will be shown.
If the error persist, make sure that your main application class extends the SpringBootServletInitializer and that you are writing the propery endpoint path.
Related
In my case, I'm implementing batch program that manages dormant accounts
My problem is this. The internal logic of the processor and the writer is not executed.
First of all, I thought about why the processor is not working. After thinking for a long time, I thought that the logic in the processor was not implemented because the data that the reader brought was not transferred to the processor.
For example, In for If the size of the repeat statement is 0, the repeat statement does not rotate at all
Usually, when transferring data from a function to a function, a parameter is used, but there is no such parameter in a batch
That's why I'm posting questions. I wonder how the data goes in order in the rotation of the batch leading to reader -> processor -> writer.
I think it's like bringing Step to StepBuilder and putting reader, processor, and writer together in one bundle and sending and receiving data in it. It is right?
Below is my code that has a problem. Please check if there is a problem with the report.
package com.capston.chatting.config.batch;
import com.capston.chatting.entity.Member;
import com.capston.chatting.enums.MemberStatus;
import com.capston.chatting.repository.MemberRepository;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.Step;
import org.springframework.batch.core.configuration.annotation.JobBuilderFactory;
import org.springframework.batch.core.configuration.annotation.StepBuilderFactory;
import org.springframework.batch.item.ItemProcessor;
import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.item.support.ListItemReader;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
#Slf4j
#RequiredArgsConstructor
#Configuration
public class InactiveMemberJobConfig {
private final MemberRepository memberRepository;
private final JobBuilderFactory jobBuilderFactory;
private final StepBuilderFactory stepBuilderFactory;
#Bean
public Job inactiveMemberJob() {
return jobBuilderFactory.get("inactiveMemberJob3")
.start(inactiveJobStep())
.build();
}
#Bean
public Step inactiveJobStep() {
return stepBuilderFactory.get("inactiveMemberStep")
.<Member, Member>chunk(10)
.reader(inactiveMemberReader())
.processor(inactiveMemberProcessor())
.writer(inactiveMemberWriter())
.allowStartIfComplete(true)
.build();
}
#Bean
public ListItemReader<Member> inactiveMemberReader() {
log.info("InactiveMemberReader execution");
List<Member> oldMembers = memberRepository
.findByUpdateDateBeforeAndStatusEquals(LocalDateTime.now().minusYears(1), MemberStatus.ACTIVE);
ArrayList<Member> collect = oldMembers.stream().map(member -> member.setInactive()).collect(Collectors.toCollection(ArrayList::new));
memberRepository.saveAll(collect);
return new ListItemReader<>(oldMembers);
}
#Bean
public ItemProcessor<Member, Member> inactiveMemberProcessor() {
log.info("test");
ItemProcessor<Member, Member> memberItemProcessor = (member) -> { // dose not working
log.info("InactiveMemberProcessor execution");
return member.setInactive();
};
return memberItemProcessor;
// return new ItemProcessor<Member, Member>() { // dose not working
// #Override
// public Member process(Member member) throws Exception {
// log.info("InactiveMemberProcessor execution");
// return member.setInactive();
// }
// };
// return member -> { // does not working
// log.info("InactiveMemberProcessor 작동");
// return member.setInactive();
// };
}
#Bean
public ItemWriter<Member> inactiveMemberWriter() {
log.info("InactiveMemberWriter execution");
return ((List<? extends Member> members) -> {
memberRepository.saveAll(members);
log.info("Members : {}", members);
});
}
}
Output
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.7.2)
2022-08-22 21:57:29.812 INFO 18204 --- [ restartedMain] c.capston.chatting.ChattingApplication : Starting ChattingApplication using Java 11.0.12 on DESKTOP-SHB62PK with PID 18204 (D:\chatting\chatting\build\classes\java\main started by user in D:\chatting\chatting)
2022-08-22 21:57:29.813 INFO 18204 --- [ restartedMain] c.capston.chatting.ChattingApplication : The following 4 profiles are active: "google", "naver", "kakao", "local"
2022-08-22 21:57:29.835 INFO 18204 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2022-08-22 21:57:29.835 INFO 18204 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2022-08-22 21:57:30.203 INFO 18204 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2022-08-22 21:57:30.235 INFO 18204 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 28 ms. Found 4 JPA repository interfaces.
2022-08-22 21:57:30.549 INFO 18204 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2022-08-22 21:57:30.554 INFO 18204 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2022-08-22 21:57:30.554 INFO 18204 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.65]
2022-08-22 21:57:30.626 INFO 18204 --- [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2022-08-22 21:57:30.626 INFO 18204 --- [ restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 791 ms
2022-08-22 21:57:30.669 INFO 18204 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2022-08-22 21:57:30.812 INFO 18204 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2022-08-22 21:57:30.870 INFO 18204 --- [ restartedMain] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2022-08-22 21:57:30.892 INFO 18204 --- [ restartedMain] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.6.10.Final
2022-08-22 21:57:30.970 INFO 18204 --- [ restartedMain] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2022-08-22 21:57:31.021 INFO 18204 --- [ restartedMain] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQL8Dialect
2022-08-22 21:57:31.272 INFO 18204 --- [ restartedMain] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2022-08-22 21:57:31.276 INFO 18204 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2022-08-22 21:57:31.700 INFO 18204 --- [ restartedMain] o.s.s.web.DefaultSecurityFilterChain : Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter#62d2016, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter#62c4efa9, org.springframework.security.web.context.SecurityContextPersistenceFilter#56b3c5da, org.springframework.security.web.header.HeaderWriterFilter#266f4945, org.springframework.security.web.authentication.logout.LogoutFilter#73659a41, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#3cc99087, org.springframework.security.web.session.ConcurrentSessionFilter#52b3aca9, org.springframework.security.web.savedrequest.RequestCacheAwareFilter#44b457bc, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter#16cb2cdf, org.springframework.security.web.authentication.AnonymousAuthenticationFilter#fd87fe6, org.springframework.security.web.session.SessionManagementFilter#5f5bda7b, org.springframework.security.web.access.ExceptionTranslationFilter#612557ba, org.springframework.security.web.access.intercept.FilterSecurityInterceptor#19931dcc]
2022-08-22 21:57:31.707 INFO 18204 --- [ restartedMain] c.c.c.c.batch.InactiveMemberJobConfig : InactiveMemberReader execution
2022-08-22 21:57:31.724 DEBUG 18204 --- [ restartedMain] org.hibernate.SQL :
select
member0_.member_id as member_i1_3_,
member0_.created_date as created_2_3_,
member0_.login_id as login_id3_3_,
member0_.login_pw as login_pw4_3_,
member0_.name as name5_3_,
member0_.role as role6_3_,
member0_.score as score7_3_,
member0_.status as status8_3_,
member0_.update_date as update_d9_3_
from
member member0_
where
member0_.update_date<?
and member0_.status=?
2022-08-22 21:57:31.765 WARN 18204 --- [ restartedMain] o.s.b.a.batch.JpaBatchConfigurer : JPA does not support custom isolation levels, so locks may not be taken when launching Jobs. To silence this warning, set 'spring.batch.jdbc.isolation-level-for-create' to 'default'.
2022-08-22 21:57:31.767 INFO 18204 --- [ restartedMain] o.s.b.c.r.s.JobRepositoryFactoryBean : No database type set, using meta data indicating: MYSQL
2022-08-22 21:57:31.774 INFO 18204 --- [ restartedMain] o.s.b.c.l.support.SimpleJobLauncher : No TaskExecutor has been set, defaulting to synchronous executor.
2022-08-22 21:57:31.807 INFO 18204 --- [ restartedMain] c.c.c.c.batch.InactiveMemberJobConfig : test // next step is "InactiveMemberProceesor execution" log but not happened
2022-08-22 21:57:31.807 INFO 18204 --- [ restartedMain] c.c.c.c.batch.InactiveMemberJobConfig : InactiveMemberWriter execution
2022-08-22 21:57:32.001 INFO 18204 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2022-08-22 21:57:32.022 INFO 18204 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2022-08-22 21:57:32.024 INFO 18204 --- [ restartedMain] o.s.m.s.b.SimpleBrokerMessageHandler : Starting...
2022-08-22 21:57:32.024 INFO 18204 --- [ restartedMain] o.s.m.s.b.SimpleBrokerMessageHandler : BrokerAvailabilityEvent[available=true, SimpleBrokerMessageHandler [org.springframework.messaging.simp.broker.DefaultSubscriptionRegistry#6a114117]]
2022-08-22 21:57:32.024 INFO 18204 --- [ restartedMain] o.s.m.s.b.SimpleBrokerMessageHandler : Started.
2022-08-22 21:57:32.029 INFO 18204 --- [ restartedMain] c.capston.chatting.ChattingApplication : Started ChattingApplication in 2.431 seconds (JVM running for 2.948)
2022-08-22 21:57:32.030 INFO 18204 --- [ restartedMain] o.s.b.a.b.JobLauncherApplicationRunner : Running default command line with: []
2022-08-22 21:57:32.451 INFO 18204 --- [ restartedMain] o.s.b.c.l.support.SimpleJobLauncher : Job: [SimpleJob: [name=inactiveMemberJob3]] launched with the following parameters: [{}]
2022-08-22 21:57:32.731 INFO 18204 --- [ restartedMain] o.s.batch.core.job.SimpleStepHandler : Executing step: [inactiveMemberStep]
2022-08-22 21:57:32.938 INFO 18204 --- [ restartedMain] o.s.batch.core.step.AbstractStep : Step: [inactiveMemberStep] executed in 207ms
2022-08-22 21:57:33.098 INFO 18204 --- [ restartedMain] o.s.b.c.l.support.SimpleJobLauncher : Job: [SimpleJob: [name=inactiveMemberJob3]] completed with the following parameters: [{}] and the following status: [COMPLETED] in 573ms
2022-08-22 21:58:31.637 INFO 18204 --- [MessageBroker-1] o.s.w.s.c.WebSocketMessageBrokerStats : WebSocketSession[0 current WS(0)-HttpStream(0)-HttpPoll(0), 0 total, 0 closed abnormally (0 connect failure, 0 send limit, 0 transport error)], stompSubProtocol[processed CONNECT(0)-CONNECTED(0)-DISCONNECT(0)], stompBrokerRelay[null], inboundChannel[pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0], outboundChannel[pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0], sockJsScheduler[pool size = 1, active threads = 1, queued tasks = 0, completed tasks = 0]
2022-08-22 22:28:31.643 INFO 18204 --- [MessageBroker-1] o.s.w.s.c.WebSocketMessageBrokerStats : WebSocketSession[0 current WS(0)-HttpStream(0)-HttpPoll(0), 0 total, 0 closed abnormally (0 connect failure, 0 send limit, 0 transport error)], stompSubProtocol[processed CONNECT(0)-CONNECTED(0)-DISCONNECT(0)], stompBrokerRelay[null], inboundChannel[pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0], outboundChannel[pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0], sockJsScheduler[pool size = 2, active threads = 1, queued tasks = 0, completed tasks = 1]
2022-08-22 22:39:54.662 INFO 18204 --- [nio-8080-exec-2] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2022-08-22 22:39:54.662 INFO 18204 --- [nio-8080-exec-2] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2022-08-22 22:39:54.663 INFO 18204 --- [nio-8080-exec-2] o.s.web.servlet.DispatcherServlet : Completed initialization in 1 ms
The problem has been solved. In Step properties, the allowStartIfComplete property is given as true, so it works normally. But the question is still valid. I want to know how the data moves in the rotation of reader->processor->wrtier.
the application stands up but the graphql end point is not produced. I generated this project on start.spring.io but originally settings is the graphql end point not produced
application.yml
datasource:
url: jdbc:postgresql://localhost:10000/postgres
username: admin
password: 12345
graphql:
graphiql:
enabled: true
log
2022-07-07 09:44:40.006 INFO 10960 --- [ restartedMain] c.i.e.EmployeeManagmentApplication : No active profile set, falling back to 1 default profile: "default"
2022-07-07 09:44:40.173 INFO 10960 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2022-07-07 09:44:40.173 INFO 10960 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2022-07-07 09:44:41.787 INFO 10960 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode
2022-07-07 09:44:41.788 INFO 10960 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2022-07-07 09:44:41.823 INFO 10960 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 13 ms. Found 0 JPA repository interfaces.
2022-07-07 09:44:41.866 INFO 10960 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode
2022-07-07 09:44:41.869 INFO 10960 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode.
2022-07-07 09:44:41.891 INFO 10960 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 2 ms. Found 0 Redis repository interfaces.
2022-07-07 09:44:43.152 INFO 10960 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2022-07-07 09:44:43.168 INFO 10960 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2022-07-07 09:44:43.168 INFO 10960 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.64]
2022-07-07 09:44:43.326 INFO 10960 --- [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2022-07-07 09:44:43.326 INFO 10960 --- [ restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 3149 ms
2022-07-07 09:44:43.500 INFO 10960 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2022-07-07 09:44:43.722 INFO 10960 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2022-07-07 09:44:43.794 INFO 10960 --- [ restartedMain] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2022-07-07 09:44:43.927 INFO 10960 --- [ restartedMain] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.6.9.Final
2022-07-07 09:44:44.284 INFO 10960 --- [ restartedMain] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2022-07-07 09:44:44.547 INFO 10960 --- [ restartedMain] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.PostgreSQL10Dialect
2022-07-07 09:44:44.780 INFO 10960 --- [ restartedMain] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2022-07-07 09:44:44.793 INFO 10960 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2022-07-07 09:44:44.903 WARN 10960 --- [ restartedMain] 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
2022-07-07 09:44:46.688 INFO 10960 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2022-07-07 09:44:46.779 INFO 10960 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2022-07-07 09:44:46.805 INFO 10960 --- [ restartedMain] c.i.e.EmployeeManagmentApplication : Started EmployeeManagmentApplication in 7.652 seconds (JVM running for 10.128)```
pom.xml
please, I need some help, I've been stuck with this error 2 days.
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'adsController': Unsatisfied dependency expressed through field 'shortUrlService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'shortUrlServiceImpl': Unsatisfied dependency expressed through field 'shortUrlRepository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shortUrlRepository' defined in com.codepressed.urlShortener.dao.ShortUrlRepository defined in #EnableMongoRepositories declared on MongoRepositoriesRegistrar.EnableMongoRepositoriesConfiguration: Invocation of init method failed; nested exception is org.springframework.data.mapping.PropertyReferenceException: No property desc found for type LocalDateTime! Traversed path: ShortUrl.creationDate.
Error display
This is my code:
Service class
#Service
public class AdvertisementServiceImpl implements AdvertisementService{
#Autowired
AdvertisementRepository advertisementRepository;
#Autowired
private MongoUtilsService mongoUtilsService;
#Override
public Advertisement save(Advertisement advertisement) {
advertisement.set_id(mongoUtilsService.getNextValue("AD"));
return advertisementRepository.insert(advertisement);
}
#Override
public void removeAd(Advertisement advertisement) {
advertisementRepository.delete(advertisement);
}
#Override
public Advertisement randomAd() {
List<Advertisement> allAds = advertisementRepository.findAll();
Random random = new Random();
return allAds.get(random.nextInt(allAds.size()-1));
}
}
My repository
#RepositoryRestResource
public interface AdvertisementRepository extends MongoRepository<Advertisement,Long> {
}
Controller class
#Controller
#RequestMapping("/ad")
public class AdsController {
#Autowired
AdvertisementService advertisementService;
#Autowired
ShortUrlService shortUrlService;
#GetMapping(value="/{id}")
public String getRandomAd(#PathVariable Long id, Model model){
model.addAttribute("ad", advertisementService.randomAd());
String url;
if (shortUrlService.findUrlById(id) != null){
url = shortUrlService.findUrlById(id);
}else if (shortUrlService.findUrlByCustom(String.valueOf(id)) != null){
url = shortUrlService.findUrlByCustom(String.valueOf(id));
}else {
url = "/error404.html";
}
model.addAttribute("url", url);
return "go";
}
I would like to use the ServiceImpl and Service but I don't know why wouldn't I be able to autowire them.
Additionaly, I have on my Config Class the following annotation:
#ComponentScan({"com.codepressed.urlShortener", "com.codepressed.urlShortener.dao",
"com.codepressed.urlShortener.service", "com.codepressed.urlShortener.controller"})
but doesn't seem to be enough...
please, any help is appreciated, I can't see the error or I don't understand it.
GITHUB REPO: https://github.com/codepressed/Jurly/tree/master/src/main/java/com/codepressed/urlShortener
I just cloned your code, on github.
I found that your method naming does not conform to the Spring-Data JPA specification.
Rename ShortUrlRepository method:
List<ShortUrl> findFirst10ByCreationDateDesc();
to:
List<ShortUrl> findFirst10ByOrderByCreationDateDesc();
When this problem is solved, run the application,console output:
No session repository could be auto-configured, check your configuration
So I created a mongo http session config:
package com.codepressed.urlShortener.config;
import org.springframework.context.annotation.Bean;
import org.springframework.session.data.mongo.JdkMongoSessionConverter;
import org.springframework.session.data.mongo.config.annotation.web.http.EnableMongoHttpSession;
import java.time.Duration;
#EnableMongoHttpSession
public class HttpSessionConfig {
#Bean
public JdkMongoSessionConverter jdkMongoSessionConverter() {
return new JdkMongoSessionConverter(Duration.ofMinutes(30));
}
}
Then I run the application again,No exception output!
2021-06-18 00:06:49.844 INFO 13960 --- [ main] c.c.u.UrlShortenerApplication : Starting UrlShortenerApplication using Java 11.0.10 on Mashiros-iMac.lan with PID 13960 (/Users/rat/IdeaProjects/Jurly/target/classes started by rat in /Users/rat/IdeaProjects/Jurly)
2021-06-18 00:06:49.850 INFO 13960 --- [ main] c.c.u.UrlShortenerApplication : No active profile set, falling back to default profiles: default
2021-06-18 00:06:50.295 INFO 13960 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data MongoDB repositories in DEFAULT mode.
2021-06-18 00:06:50.329 INFO 13960 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 32 ms. Found 2 MongoDB repository interfaces.
2021-06-18 00:06:50.667 INFO 13960 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2021-06-18 00:06:50.674 INFO 13960 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2021-06-18 00:06:50.674 INFO 13960 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.45]
2021-06-18 00:06:50.717 INFO 13960 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2021-06-18 00:06:50.718 INFO 13960 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 833 ms
2021-06-18 00:06:50.838 INFO 13960 --- [ main] org.mongodb.driver.cluster : Cluster created with settings {hosts=[127.0.0.1:27017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms'}
2021-06-18 00:06:50.875 INFO 13960 --- [127.0.0.1:27017] org.mongodb.driver.connection : Opened connection [connectionId{localValue:2, serverValue:1}] to 127.0.0.1:27017
2021-06-18 00:06:50.875 INFO 13960 --- [127.0.0.1:27017] org.mongodb.driver.connection : Opened connection [connectionId{localValue:1, serverValue:2}] to 127.0.0.1:27017
2021-06-18 00:06:50.876 INFO 13960 --- [127.0.0.1:27017] org.mongodb.driver.cluster : Monitor thread successfully connected to server with description ServerDescription{address=127.0.0.1:27017, type=STANDALONE, state=CONNECTED, ok=true, minWireVersion=0, maxWireVersion=9, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=30, roundTripTimeNanos=11069828}
2021-06-18 00:06:51.052 INFO 13960 --- [ main] org.mongodb.driver.connection : Opened connection [connectionId{localValue:3, serverValue:3}] to 127.0.0.1:27017
2021-06-18 00:06:51.067 INFO 13960 --- [ main] o.s.s.d.m.AbstractMongoSessionConverter : Creating TTL index on field expireAt
2021-06-18 00:06:51.536 INFO 13960 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2021-06-18 00:06:51.600 INFO 13960 --- [ main] o.s.b.a.w.s.WelcomePageHandlerMapping : Adding welcome page template: index
2021-06-18 00:06:51.891 INFO 13960 --- [ main] .s.s.UserDetailsServiceAutoConfiguration :
Using generated security password: 1c0d09bd-73cc-42aa-8f6a-df157db252fe
2021-06-18 00:06:52.022 INFO 13960 --- [ main] o.s.s.web.DefaultSecurityFilterChain : Will secure any request with [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter#1e95f584, org.springframework.security.web.context.SecurityContextPersistenceFilter#1a336906, org.springframework.security.web.header.HeaderWriterFilter#39afe59f, org.springframework.security.web.csrf.CsrfFilter#3a3316b6, org.springframework.security.web.authentication.logout.LogoutFilter#57fce8b, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#1b4ba615, org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter#3a9c11fb, org.springframework.security.web.authentication.ui.DefaultLogoutPageGeneratingFilter#54997f67, org.springframework.security.web.authentication.www.BasicAuthenticationFilter#18e8eb59, org.springframework.security.web.savedrequest.RequestCacheAwareFilter#20f63ddc, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter#24f177f5, org.springframework.security.web.authentication.AnonymousAuthenticationFilter#bf4e48e, org.springframework.security.web.session.SessionManagementFilter#43756cb, org.springframework.security.web.access.ExceptionTranslationFilter#48ee3c2d, org.springframework.security.web.access.intercept.FilterSecurityInterceptor#e6e5da4]
2021-06-18 00:06:52.105 INFO 13960 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2021-06-18 00:06:52.115 INFO 13960 --- [ main] c.c.u.UrlShortenerApplication : Started UrlShortenerApplication in 2.542 seconds (JVM running for 3.116)
I think you should refer to the following tutorials:
Spring Session with MongoDB
Sorting Query Results with Spring Data
I am now making Spring boot based Web project.
When using AWS EC2 ubuntu for deployment, unsolved error came out and I want to share.
Project stack: Spring boot + AWS (EC2, S3, RDS(MariaDB))
Deployment is run by ubuntu with Spring boot JAR file.
java -jar *.jar
The problem is whenever I start application by JAR file, the server immediately stops with this log. I thought it is because of WebSocketConfig.java for Chat messaging function, but even I added Threadpoooltaskschedule and STOMP setAllowedOrigins, symtoms still exists.
Exhausted with solving by own, I need some help from you guys.
WebSocketConfig.java
private static final Logger LOGGER = LoggerFactory.getLogger(WebsocketBrokerConfig.class);
#Override
public void configureMessageBroker(MessageBrokerRegistry registry) {
//for subscribe prefix
registry.enableSimpleBroker("/user");
//for publish prefix
registry.setApplicationDestinationPrefixes("/app");
//user destination provides ability to have unique user queue
//registry.setUserDestinationPrefix("/user");
}
#Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
registry.addEndpoint("/broadcast")
.setAllowedOrigins("http://ec2....amazonaws.com")
.withSockJS()
.setHeartbeatTime(60_000);
}
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.4.3)
2021-03-03 00:44:34.278 INFO 5898 --- [ main] com.example.salle.SalleApplication : Starting SalleApplication v0.0.1-SNAPSHOT using Java 1.8.0_282 on ip-172-31-46-33 with PID 5898 (/home/ubuntu/salle/salle/target/test-0.0.1-SNAPSHOT.jar started by ubuntu in /home/ubuntu/salle/salle)
2021-03-03 00:44:34.283 INFO 5898 --- [ main] com.example.salle.SalleApplication : No active profile set, falling back to default profiles: default
2021-03-03 00:44:36.435 INFO 5898 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2021-03-03 00:44:36.489 INFO 5898 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 31 ms. Found 0 JPA repository interfaces.
2021-03-03 00:44:38.298 INFO 5898 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2021-03-03 00:44:38.330 INFO 5898 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2021-03-03 00:44:38.330 INFO 5898 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.43]
2021-03-03 00:44:39.363 INFO 5898 --- [ 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-03-03 00:44:39.969 INFO 5898 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2021-03-03 00:44:39.969 INFO 5898 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 5536 ms
2021-03-03 00:44:41.016 INFO 5898 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2021-03-03 00:44:41.247 INFO 5898 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2021-03-03 00:44:41.408 INFO 5898 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2021-03-03 00:44:41.600 INFO 5898 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.4.28.Final
2021-03-03 00:44:41.900 INFO 5898 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2021-03-03 00:44:42.217 INFO 5898 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MariaDB103Dialect
2021-03-03 00:44:43.125 INFO 5898 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
ct.MariaDB103Dialect
2021-03-03 00:44:43.155 INFO 5898 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2021-03-03 00:44:45.786 INFO 5898 --- [ main] o.s.s.c.ThreadPoolTaskScheduler : Initializing ExecutorService
2021-03-03 00:44:45.860 INFO 5898 --- [ main] o.s.s.c.ThreadPoolTaskScheduler : Initializing ExecutorService 'messageBrokerTaskScheduler'
2021-03-03 00:44:46.023 INFO 5898 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'clientInboundChannelExecutor'
2021-03-03 00:44:46.025 INFO 5898 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'clientOutboundChannelExecutor'
2021-03-03 00:44:46.035 INFO 5898 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'brokerChannelExecutor'
2021-03-03 00:44:46.140 WARN 5898 --- [ 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-03-03 00:44:47.221 INFO 5898 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2021-03-03 00:44:47.227 INFO 5898 --- [ main] o.s.m.s.b.SimpleBrokerMessageHandler : Starting...
2021-03-03 00:44:47.227 INFO 5898 --- [ main] o.s.m.s.b.SimpleBrokerMessageHandler : BrokerAvailabilityEvent[available=true, SimpleBrokerMessageHandler [DefaultSubscriptionRegistry[cache[0 destination(s)], registry[0 sessions]]]]
2021-03-03 00:44:47.233 INFO 5898 --- [ main] o.s.m.s.b.SimpleBrokerMessageHandler : Started.
2021-03-03 00:44:47.252 INFO 5898 --- [ main] com.example.salle.SalleApplication : Started SalleApplication in 14.288 seconds (JVM running for 15.469)
2021-03-03 00:45:00.256 INFO 5898 --- [extShutdownHook] o.s.m.s.b.SimpleBrokerMessageHandler : Stopping...
2021-03-03 00:45:00.258 INFO 5898 --- [extShutdownHook] o.s.m.s.b.SimpleBrokerMessageHandler : BrokerAvailabilityEvent[available=false, SimpleBrokerMessageHandler [DefaultSubscriptionRegistry[cache[0 destination(s)], registry[0 sessions]]]]
2021-03-03 00:45:00.258 INFO 5898 --- [extShutdownHook] o.s.m.s.b.SimpleBrokerMessageHandler : Stopped.
2021-03-03 00:45:00.284 INFO 5898 --- [extShutdownHook] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'brokerChannelExecutor'
2021-03-03 00:45:00.284 INFO 5898 --- [extShutdownHook] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'clientOutboundChannelExecutor'
2021-03-03 00:45:00.284 INFO 5898 --- [extShutdownHook] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'clientInboundChannelExecutor'
2021-03-03 00:45:00.284 INFO 5898 --- [extShutdownHook] o.s.s.c.ThreadPoolTaskScheduler : Shutting down ExecutorService 'messageBrokerTaskScheduler'
2021-03-03 00:45:00.296 INFO 5898 --- [extShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2021-03-03 00:45:00.299 INFO 5898 --- [extShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...```
The easiest way to put a Spring BOOT app on an EC2 instance is to use Elastic Beanstalk. Read this AWS doc for more details - https://aws.amazon.com/blogs/devops/deploying-a-spring-boot-application-on-aws-using-aws-elastic-beanstalk/
From my understanding using #SpringBootApplication is the equivalent of having #EnableAutoConfiguration and #ComponentScan. For this reason I can't understand why Spring isn't finding my annotations. As far as I'm aware the project structure is as it should be and everything is annotated properly. However when I visit the mapped endpoint http://localhost:8080/dashboard or http://localhost:8080/dashboard/, I see a 404 error.
I just created a new Spring Boot project using IntelliJ's built in Spring Initialiser, I selected Spring Web, and a few components for Postgres. Inside the project I can't find any additional .xml files for configuration. However, I did find:
DataSourceInitializerInvoker.java - which hasn't been edited
ConfigurationPropertiesAutoConfiguration.java - which hasn't been edited
Structure of my project is as follows:
com
+-abcde
+-appname
+-controllers
DashboardController.java
Application.java
Application.java:
package com.abcde.appname;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
#SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
DashboardController.java
package com.abcde.appname.controllers;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
#Controller
#RequestMapping("/dashboard")
public class DashboardController {
#Autowired
public DashboardController() {
}
#GetMapping
public ModelAndView renderDashboard() {
return new ModelAndView("dashboard/index");
}
}
Alongside these files I also have the following,
application.properties
spring.datasource.url=jdbc:postgresql://localhost:5432/postgres
spring.datasource.username=user
spring.datasource.driver-class-name=org.postgresql.Driver
spring.main.banner-mode=off
build.gradle
plugins {
id 'org.springframework.boot' version '2.3.3.RELEASE'
id 'io.spring.dependency-management' version '1.0.10.RELEASE'
id 'java'
}
group = 'com.abcde'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '14'
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-freemarker'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.flywaydb:flyway-core'
runtimeOnly 'org.postgresql:postgresql'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
}
test {
useJUnitPlatform()
}
stacktrace
2020-09-09 23:24:46.053 INFO 57966 --- [ main] c.d.f.Application : Starting Application on OP-MacBook-Pro.local with PID 57966 (/Users/op/IdeaProjects/lalala/build/classes/java/main started by op in /Users/op/IdeaProjects/lalala)
2020-09-09 23:24:46.054 INFO 57966 --- [ main] c.d.f.Application : No active profile set, falling back to default profiles: default
2020-09-09 23:24:46.374 INFO 57966 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFERRED mode.
2020-09-09 23:24:46.388 INFO 57966 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 10ms. Found 0 JPA repository interfaces.
2020-09-09 23:24:46.716 INFO 57966 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2020-09-09 23:24:46.720 INFO 57966 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2020-09-09 23:24:46.720 INFO 57966 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.37]
2020-09-09 23:24:46.775 INFO 57966 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2020-09-09 23:24:46.775 INFO 57966 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 700 ms
2020-09-09 23:24:46.832 INFO 57966 --- [ main] o.f.c.internal.license.VersionPrinter : Flyway Community Edition 6.4.4 by Redgate
2020-09-09 23:24:46.835 INFO 57966 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2020-09-09 23:24:46.872 INFO 57966 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2020-09-09 23:24:46.879 INFO 57966 --- [ main] o.f.c.internal.database.DatabaseFactory : Database: jdbc:postgresql://localhost:5432/postgres (PostgreSQL 12.3)
2020-09-09 23:24:46.901 INFO 57966 --- [ main] o.f.core.internal.command.DbValidate : Successfully validated 1 migration (execution time 00:00.011s)
2020-09-09 23:24:46.905 INFO 57966 --- [ main] o.f.core.internal.command.DbMigrate : Current version of schema "public": 10
2020-09-09 23:24:46.905 INFO 57966 --- [ main] o.f.core.internal.command.DbMigrate : Schema "public" is up to date. No migration necessary.
2020-09-09 23:24:46.960 INFO 57966 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2020-09-09 23:24:46.985 INFO 57966 --- [ task-1] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2020-09-09 23:24:47.000 WARN 57966 --- [ 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
2020-09-09 23:24:47.010 INFO 57966 --- [ task-1] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.4.20.Final
2020-09-09 23:24:47.070 INFO 57966 --- [ task-1] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.0.Final}
2020-09-09 23:24:47.122 INFO 57966 --- [ task-1] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.PostgreSQL10Dialect
2020-09-09 23:24:47.253 INFO 57966 --- [ task-1] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2020-09-09 23:24:47.257 INFO 57966 --- [ task-1] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2020-09-09 23:24:47.264 INFO 57966 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2020-09-09 23:24:47.265 INFO 57966 --- [ main] DeferredRepositoryInitializationListener : Triggering deferred initialization of Spring Data repositories…
2020-09-09 23:24:47.266 INFO 57966 --- [ main] DeferredRepositoryInitializationListener : Spring Data repositories initialized!
2020-09-09 23:24:47.273 INFO 57966 --- [ main] c.d.f.lalala : Started Application in 1.401 seconds (JVM running for 1.885)
2020-09-09 23:24:49.520 INFO 57966 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2020-09-09 23:24:49.520 INFO 57966 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2020-09-09 23:24:49.524 INFO 57966 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 4 ms
Any insight into this problem would be much appreciated. Many thanks
It's probably successfully invoking the renderDashboard() and is not finding "dashboard/index". You can verify that by debugging and setting a breakpoint or adding a log/System.out println statement. Does your index file exist and is it setup correctly?