spring boot-gradle-new blog Почему приложение не запускается?
Подробную информацию об исходном коде можно найти по адресу https://github.com/chikashishirozu/springboot- gradle-new_blog.
$ ./gradlew clean build --refresh-dependencies
BUILD SUCCESSFUL in 6s
4 actionable tasks: 1 executed, 3 up-to-date
$ ./gradlew bootRun
> Task :bootRun
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v3.4.1)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource
2025-01-21T12:37:51.844+09:00 ERROR 71559 --- [ restartedMain]
o.s.boot.SpringApplication : Application run failed
2025-01-21T12:37:50.451+09:00 DEBUG 71559 --- [ restartedMain]
o.s.b.f.s.DefaultListableBeanFactory : Creating shared instance of singleton bean
'preserveErrorControllerTargetClassPostProcessor'
2025-01-21T12:37:51.744+09:00 WARN 71559 --- [ restartedMain]
ConfigServletWebServerApplicationContext : Exception encountered during context
initialization - cancelling refresh attempt:
org.springframework.beans.factory.BeanCreationException: Error creating bean with
name 'entityManagerFactory' defined in class path resource
[org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]:
Failed to initialize dependency 'flywayInitializer' of LoadTimeWeaverAware bean
'entityManagerFactory': Error creating bean with name 'flywayInitializer' defined in
class path resource
2025-01-21T12:37:50.747+09:00 DEBUG 71559 --- [ restartedMain]
o.s.b.f.s.DefaultListableBeanFactory : Creating shared instance of singleton bean
'errorPageCustomizer'
2025-01-21T12:37:50.747+09:00 DEBUG 71559 --- [ restartedMain]
o.s.b.f.s.DefaultListableBeanFactory : Creating shared instance of singleton bean
'org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration'
2025-01-21T12:37:50.748+09:00 DEBUG 71559 --- [ restartedMain]
o.s.b.f.s.DefaultListableBeanFactory : Autowiring by type from bean name
'org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration'
via constructor to bean named 'server-
org.springframework.boot.autoconfigure.web.ServerProperties'
2025-01-21T12:37:50.780+09:00 DEBUG 71559 --- [ restartedMain]
o.s.b.f.s.DefaultListableBeanFactory : Autowiring by type from bean name
'errorPageCustomizer' via factory method to bean named
'dispatcherServletRegistration'
Exception encountered during context initialization - cancelling refresh attempt:
org.springframework.beans.factory.BeanCreationException: Error creating bean with
name 'entityManagerFactory' defined in class path resource
[org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]:
Failed to initialize dependency 'flywayInitializer' of LoadTimeWeaverAware bean
'entityManagerFactory': Error creating bean with name 'flywayInitializer' defined in
class path resource
ErrorMvcAutoConfiguration matched:
- @ConditionalOnClass found required classes 'jakarta.servlet.Servlet',
'org.springframework.web.servlet.DispatcherServlet' (OnClassCondition)
- found 'session' scope (OnWebApplicationCondition)
ErrorMvcAutoConfiguration#basicErrorController matched:
- @ConditionalOnMissingBean (types:
org.springframework.boot.web.servlet.error.ErrorController; SearchStrategy: current)
did not find any beans (OnBeanCondition)
ErrorMvcAutoConfiguration#errorAttributes matched:
- @ConditionalOnMissingBean (types:
org.springframework.boot.web.servlet.error.ErrorAttributes; SearchStrategy: current)
did not find any beans (OnBeanCondition)
ErrorMvcAutoConfiguration.DefaultErrorViewResolverConfiguration#conventionErrorViewResolver соответствует:
- @ConditionalOnBean (типы: org.springframework.web.servlet.DispatcherServlet;
SearchStrategy: all) найден bean 'dispatcherServlet '; @ConditionalOnMissingBean
(типы: org.springframework.boot.autoconfigure.web.servlet.error.ErrorViewResolver;
SearchStrategy: all) не нашел ни одного bean-компонента (OnBeanCondition)
ErrorMvcAutoConfiguration.DefaultErrorViewResolverConfiguration#conventionErrorViewResolver соответствует:
- @ConditionalOnBean (типы: org.springframework.web.servlet.DispatcherServlet;
SearchStrategy: all) нашел компонент 'dispatcherServlet'; @ConditionalOnMissingBean
(типы: org.springframework.boot.autoconfigure.web.servlet.error.ErrorViewResolver;
SearchStrategy: all) не нашел ни одного bean-компонента (OnBeanCondition)
ErrorMvcAutoConfiguration.WhitelabelErrorViewConfiguration:
Не соответствует:
- ErrorTemplate Отсутствует найденный шаблон из
org.springframework.boot.autoconfigure.thymeleaf.ThymeleafTemplateAvailabilityProvider@1f553ae9 (ErrorMvcAutoConfiguration.ErrorTemplateMissingCondition)
Соответствует:
- @ConditionalOnProperty (server.error.whitelabel.enabled) соответствует(OnPropertyCondition)
ErrorWebFluxAutoConfiguration:
Did not match:
- @ConditionalOnClass did not find required class
'org.springframework.web.reactive.config.WebFluxConfigurer' (OnClassCondition)
WebMvcAutoConfiguration.ProblemDetailsErrorHandlingConfiguration:
Did not match:
- @ConditionalOnProperty (spring.mvc.problemdetails.enabled=true) did not find
property 'enabled' (OnPropertyCondition)
2025-01-21T12:37:51.844+09:00 ERROR 71559 --- [ restartedMain]
o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with
name 'entityManagerFactory' defined in class path resource
[org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]:
Failed to initialize dependency 'flywayInitializer' of LoadTimeWeaverAware bean
'entityManagerFactory': Error creating bean with name 'flywayInitializer' defined in
class path resource
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'flywayInitializer' defined in class path resource
BUILD SUCCESSFUL in 6s
4 actionable tasks: 1 executed, 3 up-to-date
Почему не запускаются операции CRUD или приложение?
build.gradle
plugins {
id 'org.springframework.boot' version '3.4.1'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'java'
}
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'
repositories {
mavenCentral()
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceSets {
main {
java {
srcDirs = ['src/main/java']
}
}
test {
java {
srcDirs = ['src/test/java']
}
}
}
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-data-rest'
implementation 'org.springframework.boot:spring-boot-starter-web-services'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-authorization-server'
implementation 'org.springframework.boot:spring-boot-starter-graphql'
implementation 'org.springframework.boot:spring-boot-starter-freemarker'
implementation 'org.springframework.boot:spring-boot-starter-groovy-templates'
implementation 'org.springframework.boot:spring-boot-starter-jdbc'
implementation 'org.flywaydb:flyway-core:11.1.0'
implementation 'org.mariadb.jdbc:mariadb-java-client'
implementation 'mysql:mysql-connector-java:8.0.33'
implementation 'com.h2database:h2'
implementation 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
testImplementation 'org.mockito:mockito-core:3.6.28'
testImplementation 'org.mockito:mockito-junit-jupiter:3.6.28'
testImplementation 'org.testng:testng:7.5'
}
test {
useJUnitPlatform()
}
tasks.withType(JavaCompile) {
options.compilerArgs
Подробнее здесь: https://stackoverflow.com/questions/793 ... -app-start
Весенний блог boot-gradle-new Почему приложение не запускается? ⇐ JAVA
Программисты JAVA общаются здесь
-
Anonymous
1737434492
Anonymous
spring boot-gradle-new blog Почему приложение не запускается?
Подробную информацию об исходном коде можно найти по адресу https://github.com/chikashishirozu/springboot- gradle-new_blog.
$ ./gradlew clean build --refresh-dependencies
BUILD SUCCESSFUL in 6s
4 actionable tasks: 1 executed, 3 up-to-date
$ ./gradlew bootRun
> Task :bootRun
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v3.4.1)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource
2025-01-21T12:37:51.844+09:00 ERROR 71559 --- [ restartedMain]
o.s.boot.SpringApplication : Application run failed
2025-01-21T12:37:50.451+09:00 DEBUG 71559 --- [ restartedMain]
o.s.b.f.s.DefaultListableBeanFactory : Creating shared instance of singleton bean
'preserveErrorControllerTargetClassPostProcessor'
2025-01-21T12:37:51.744+09:00 WARN 71559 --- [ restartedMain]
ConfigServletWebServerApplicationContext : Exception encountered during context
initialization - cancelling refresh attempt:
org.springframework.beans.factory.BeanCreationException: Error creating bean with
name 'entityManagerFactory' defined in class path resource
[org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]:
Failed to initialize dependency 'flywayInitializer' of LoadTimeWeaverAware bean
'entityManagerFactory': Error creating bean with name 'flywayInitializer' defined in
class path resource
2025-01-21T12:37:50.747+09:00 DEBUG 71559 --- [ restartedMain]
o.s.b.f.s.DefaultListableBeanFactory : Creating shared instance of singleton bean
'errorPageCustomizer'
2025-01-21T12:37:50.747+09:00 DEBUG 71559 --- [ restartedMain]
o.s.b.f.s.DefaultListableBeanFactory : Creating shared instance of singleton bean
'org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration'
2025-01-21T12:37:50.748+09:00 DEBUG 71559 --- [ restartedMain]
o.s.b.f.s.DefaultListableBeanFactory : Autowiring by type from bean name
'org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration'
via constructor to bean named 'server-
org.springframework.boot.autoconfigure.web.ServerProperties'
2025-01-21T12:37:50.780+09:00 DEBUG 71559 --- [ restartedMain]
o.s.b.f.s.DefaultListableBeanFactory : Autowiring by type from bean name
'errorPageCustomizer' via factory method to bean named
'dispatcherServletRegistration'
Exception encountered during context initialization - cancelling refresh attempt:
org.springframework.beans.factory.BeanCreationException: Error creating bean with
name 'entityManagerFactory' defined in class path resource
[org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]:
Failed to initialize dependency 'flywayInitializer' of LoadTimeWeaverAware bean
'entityManagerFactory': Error creating bean with name 'flywayInitializer' defined in
class path resource
ErrorMvcAutoConfiguration matched:
- @ConditionalOnClass found required classes 'jakarta.servlet.Servlet',
'org.springframework.web.servlet.DispatcherServlet' (OnClassCondition)
- found 'session' scope (OnWebApplicationCondition)
ErrorMvcAutoConfiguration#basicErrorController matched:
- @ConditionalOnMissingBean (types:
org.springframework.boot.web.servlet.error.ErrorController; SearchStrategy: current)
did not find any beans (OnBeanCondition)
ErrorMvcAutoConfiguration#errorAttributes matched:
- @ConditionalOnMissingBean (types:
org.springframework.boot.web.servlet.error.ErrorAttributes; SearchStrategy: current)
did not find any beans (OnBeanCondition)
ErrorMvcAutoConfiguration.DefaultErrorViewResolverConfiguration#conventionErrorViewResolver соответствует:
- @ConditionalOnBean (типы: org.springframework.web.servlet.DispatcherServlet;
SearchStrategy: all) найден bean 'dispatcherServlet '; @ConditionalOnMissingBean
(типы: org.springframework.boot.autoconfigure.web.servlet.error.ErrorViewResolver;
SearchStrategy: all) не нашел ни одного bean-компонента (OnBeanCondition)
ErrorMvcAutoConfiguration.DefaultErrorViewResolverConfiguration#conventionErrorViewResolver соответствует:
- @ConditionalOnBean (типы: org.springframework.web.servlet.DispatcherServlet;
SearchStrategy: all) нашел компонент 'dispatcherServlet'; @ConditionalOnMissingBean
(типы: org.springframework.boot.autoconfigure.web.servlet.error.ErrorViewResolver;
SearchStrategy: all) не нашел ни одного bean-компонента (OnBeanCondition)
ErrorMvcAutoConfiguration.WhitelabelErrorViewConfiguration:
Не соответствует:
- ErrorTemplate Отсутствует найденный шаблон из
org.springframework.boot.autoconfigure.thymeleaf.ThymeleafTemplateAvailabilityProvider@1f553ae9 (ErrorMvcAutoConfiguration.ErrorTemplateMissingCondition)
Соответствует:
- @ConditionalOnProperty (server.error.whitelabel.enabled) соответствует(OnPropertyCondition)
ErrorWebFluxAutoConfiguration:
Did not match:
- @ConditionalOnClass did not find required class
'org.springframework.web.reactive.config.WebFluxConfigurer' (OnClassCondition)
WebMvcAutoConfiguration.ProblemDetailsErrorHandlingConfiguration:
Did not match:
- @ConditionalOnProperty (spring.mvc.problemdetails.enabled=true) did not find
property 'enabled' (OnPropertyCondition)
2025-01-21T12:37:51.844+09:00 ERROR 71559 --- [ restartedMain]
o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with
name 'entityManagerFactory' defined in class path resource
[org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]:
Failed to initialize dependency 'flywayInitializer' of LoadTimeWeaverAware bean
'entityManagerFactory': Error creating bean with name 'flywayInitializer' defined in
class path resource
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'flywayInitializer' defined in class path resource
BUILD SUCCESSFUL in 6s
4 actionable tasks: 1 executed, 3 up-to-date
Почему не запускаются операции CRUD или приложение?
build.gradle
plugins {
id 'org.springframework.boot' version '3.4.1'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'java'
}
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'
repositories {
mavenCentral()
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceSets {
main {
java {
srcDirs = ['src/main/java']
}
}
test {
java {
srcDirs = ['src/test/java']
}
}
}
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-data-rest'
implementation 'org.springframework.boot:spring-boot-starter-web-services'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-authorization-server'
implementation 'org.springframework.boot:spring-boot-starter-graphql'
implementation 'org.springframework.boot:spring-boot-starter-freemarker'
implementation 'org.springframework.boot:spring-boot-starter-groovy-templates'
implementation 'org.springframework.boot:spring-boot-starter-jdbc'
implementation 'org.flywaydb:flyway-core:11.1.0'
implementation 'org.mariadb.jdbc:mariadb-java-client'
implementation 'mysql:mysql-connector-java:8.0.33'
implementation 'com.h2database:h2'
implementation 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
testImplementation 'org.mockito:mockito-core:3.6.28'
testImplementation 'org.mockito:mockito-junit-jupiter:3.6.28'
testImplementation 'org.testng:testng:7.5'
}
test {
useJUnitPlatform()
}
tasks.withType(JavaCompile) {
options.compilerArgs
Подробнее здесь: [url]https://stackoverflow.com/questions/79373214/springboot-gradle-new-blog-why-doesnt-the-app-start[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия