spring-boot 55

스프링 부트 테스트가 실패하고 "Servlet Web Server Factory bean이 없어 Servlet Web Server Application Context를 시작할 수 없습니다.

스프링 부트 테스트가 실패하고 "Servlet Web Server Factory bean이 없어 Servlet Web Server Application Context를 시작할 수 없습니다. 테스트 클래스:- @RunWith(SpringRunner.class) @SpringBootTest(classes = { WebsocketSourceConfiguration.class, WebSocketSourceIntegrationTests.class }, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, properties = { "websocket.path=/some_websocket_path", "websocket.allowedOrigins=*", "spr..

programing 2023.03.26

웹 응용 프로그램이 [Timer-0]라는 이름의 스레드를 시작한 것으로 보이지만 중지하지 못했습니다.

웹 응용 프로그램이 [Timer-0]라는 이름의 스레드를 시작한 것으로 보이지만 중지하지 못했습니다. Spring Boot 1.5.9를 사용하고 있습니다.RELEASE + Java 8 + Tomcat 9 + Jersey + Oracle 및 내 앱은 다음과 같이 정의된 예약된 메서드를 가지고 있습니다. @Configuration @EnableScheduling public class ScheduleConfig implements SchedulingConfigurer { @Override public void configureTasks(ScheduledTaskRegistrar taskRegistrar) { taskRegistrar.setScheduler(taskExecutor()); } @Bean(destr..

programing 2023.03.26

스프링 부트가 정적 콘텐츠를 제공하지 않음

스프링 부트가 정적 콘텐츠를 제공하지 않음 스프링 부트 프로젝트에서 정적 컨텐츠를 처리할 수 없습니다. 가 폴더 음 i i i다 named named named named 。static아래src/main/resources그에 named 라는 폴더가 .images. 해당 를 찾을 수 앱을 패키징하여 실행해도 해당 폴더에 저장한 이미지를 찾을 수 없습니다. 에 넣으려고 했습니다.public,resources ★★★★★★★★★★★★★★★★★」META-INF/resources아무 것도 안 돼. app.를 jar로 을 알 수 .tvf app.jar jar 로f if 、 tvf app . jar 。/static/images/head.png: "" " " " " "」http://localhost:8080/images..

programing 2023.03.26

스프링 부트 Mongo Repository 유닛 테스트 방법

스프링 부트 Mongo Repository 유닛 테스트 방법 Spring Boot 웹 어플리케이션에서 데이터를 저장하기 위해 MongoDB를 사용합니다.응용 프로그램에서 확장 인터페이스를 사용하여 데이터베이스에 액세스합니다.MongoRepository. 이러한 저장소 클래스의 유닛 테스트를 설정하려면 어떻게 해야 합니까?제가 하고 싶은 건 MongoDB의 내장 메모리 인스턴스를 기동하다 JSON 또는 XML에서 테스트 데이터 삽입 자동 전원 저장소를 사용하여 테스트 데이터에 대한 쿼리를 수행합니다. Embedded MongoDB를 사용해 봤는데 파일에서 테스트 데이터를 삽입하는 방법을 알 수 없습니다.NoSQ도 사용해 보았습니다.LUnit이지만 Spring Application Configuration이..

programing 2023.03.21

스프링 - 여러 스프링 데이터 모듈이 발견되어 엄격한 저장소 구성 모드로 들어갑니다.

스프링 - 여러 스프링 데이터 모듈이 발견되어 엄격한 저장소 구성 모드로 들어갑니다. Spring Data, Spring-Data-Elastisearch 및 Spring-data-Redis(http 세션용)와 함께 Spring boot 2를 사용하고 있습니다.앱을 시작할 때.받고 있습니다 2017-10-29 17:38:33.376 INFO 18625 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode! 2017-10-29 17:38:33.451 INFO 18625 --- [ restartedMain..

programing 2023.03.21

최신 Spring Boot + Data JPA 및 휴지 상태 설정을 사용하여 ddl 작성 스크립트를 생성하는 방법

최신 Spring Boot + Data JPA 및 휴지 상태 설정을 사용하여 ddl 작성 스크립트를 생성하는 방법 현재 디폴트를 사용하고 있습니다.@SpringBootApplication에서 다음 속성을 가진 주석application.properties: spring.datasource.url=jdbc:mysql://localhost/dbname spring.datasource.username=X spring.datasource.password=X spring.datasource.driver-class-name=com.mysql.jdbc.Driver spring.jpa.hibernate.naming_strategy=my.package.CustomNamingStrategy JPA 2.1 이후로는 이 기능을..

programing 2023.03.21

Authorization Server Security Configr 사용방법

Authorization Server Security Configr 사용방법 다음 코드를 가진 스프링 부트 프로젝트를 보고 있습니다. public void configure(AuthorizationServerSecurityConfigurer oauthServer) throws Exception { oauthServer .tokenKeyAccess("permitAll()") .checkTokenAccess("isAuthenticated()"); } 유감스럽게도 실제로 사용하는 방법을 설명하는 리소스(Google, Spring 문서, Spring oauth 문서 등)를 찾을 수 없습니다.AuthorizationServerSecurityConfigurer게다가, 정확히 무엇을 알고 있는지 모르겠다.tokenK..

programing 2023.03.21

org.postgresql.displays.displayPSQLException: 오류: "app_user" 관계가 없습니다.

org.postgresql.displays.displayPSQLException: 오류: "app_user" 관계가 없습니다. 스프링 부츠나 포스트그레를 사용하고 있는 어플리케이션이 있습니다.사용자를 생성하려고 하면 이 오류가 발생합니다. 데이터베이스에서 이 쿼리를 실행하면 다음과 같은 오류가 나타납니다. select * from APP_USER ERROR: relation "app_user" does not exist LINE 1: select * from APP_USER ^ ********** Error ********** ERROR: relation "app_user" does not exist SQL state: 42P01 하지만 그걸 다음으로 바꾸면: select * from "APP_USER"..

programing 2023.03.21

antMatchers는 무슨 뜻입니까?

antMatchers는 무슨 뜻입니까? 저는 스프링 부츠를 배우고 있는데, 제 뇌가 어떤 것을 받아들이기 위해서는 의미 있는 설명을 찾을 필요가 있습니다.'개미 매처스'에서 '개미'가 무슨 뜻인지 아는 사람?"개미"와 같은 곤충이 리소스와 REST 호출 경로 사이의 매핑과 무슨 관계가 있습니까? 언어 연구 포럼이 아닌 것은 알지만, 개발자는 논리적/비논리적인 것을 이해하거나 거부할 권리도 있다고 생각합니다. 감사합니다;)이는 xml 스크립트 언어를 사용하는 Java 빌드 시스템인 Apache Ant Project에서 비롯되었습니다.이것은 Apache Ant Home 웹사이트입니다.Spring Doc for AntPathMatcher에는 "이 매핑 코드의 일부는 Apache Ant에서 친절하게 차용되었습니..

programing 2023.03.21

@JpaRepository를 구현할 때 Repository가 필요하지 않습니까?

@JpaRepository를 구현할 때 Repository가 필요하지 않습니까? 스프링 부트 앱에 저장소 클래스가 있습니다.먼저, 나는 그것에 주석을 달았다.@Repository그리고 나서 저는JpaRepository주석을 제거했지만 여전히 작동합니다. 난 그걸 봤어.JpaRepository가지고 있다@NoRepositoryBean주석입니다. 이게 어떻게 작동하나요?아니면 이게 안 되고 내 어플리케이션에 이상한 게 있는 거야?를 붙일 필요는 없습니다.@Repository확장 인터페이스의 주석JpaRepository; Spring은 미리 정의된 저장소 중 하나를 확장함으로써 저장소를 인식합니다.Repository인터페이스입니다. 의 목적@NoRepositoryBean주석은 Spring이 특정 인터페이스를 ..

programing 2023.03.11