반응형

spring-boot 24

Tymeleaf에서 스프링 애플리케이션 환경 구현

Tymeleaf에서 스프링 애플리케이션 환경 구현 My Spring Boot 어플리케이션은 다음 3가지 구성으로 실행됩니다. application.properties --> 개발 환경용 application-test.properties --> 테스트 환경용 application-production.properties --> 실가동 환경용 애플리케이션이 실행 중인 Tymeleaf 환경에서 어떻게 접근할 수 있습니까? Google Analytics 코드를 프로덕션 환경에만 포함해야 합니다.한 번에 활성 프로필이 하나만 있는 경우 다음을 수행할 수 있습니다. This is the production profile - do whatever you want in here 위의 코드는 Tymeleaf's Sprin..

programing 2023.03.14

스프링 부트에서의 여러 Web Security Configurer Adapter 사용

스프링 부트에서의 여러 Web Security Configurer Adapter 사용 나는 2개의 수업을 듣고 있다.WebSecurityConfigurerAdapter그리고 같이 일하게 할 수 없다. 아이디어는 다음과 같습니다. 하나 드세요WebSecurityConfigurerAdapter보안 체인에만 커스텀필터를 추가합니다.필터는 몇 가지 커스텀 인증을 실시해,Authentication안으로SecurityContext이것은 일반적으로 정상적으로 동작합니다.다음과 같이 설정됩니다(imports 생략). @Order(1) @Configuration @EnableWebMvcSecurity public class BestSecurityConfig extends WebSecurityConfigurerAdapte..

programing 2023.03.09

스프링 부트 - Entity Manager 구성

스프링 부트 - Entity Manager 구성 사용하고 있었습니다.Google guice제 프로젝트에서 저는 이제 틀을SpringBoot완전. Bean을 설정했습니다.persistence.xml에 있어서 다음과 같이 @Autowired @Bean(name = "transactionManager") public LocalContainerEntityManagerFactoryBean entityManagerFactory() { LocalContainerEntityManagerFactoryBean lEMF = new LocalContainerEntityManagerFactoryBean(); lEMF.setPersistenceUnitName("leaseManagementPU"); lEMF.setPersisten..

programing 2023.03.04

스프링 부트 응용 프로그램의 기본 로깅 파일

스프링 부트 응용 프로그램의 기본 로깅 파일 의 스프링 부트애플리케이션에서 로깅레벨을 설정했습니다.application.yml다음과 같습니다. logging.level.com.Myapplicationname=DEBUG 응용 프로그램은 패키징되어 Tomcat과의 전쟁 상태로 배포됩니다.이것 말고는 아직 설정 안 했어logback.xml로그 파일 등을 정의합니다. 일부 사용자가 브라우저를 통해 응용 프로그램을 사용할 때 콘솔 로그를 볼 수 있는 위치는 어디입니까? 프레임워크에 의해 작성된 기본 파일이 있습니까?Spring-Boot 2.3.x 이전 다음 중 하나를 지정해야 합니다.logging.file또는logging.path, 그러나 둘 다(둘 다 지정되어 있는 경우,logging.path무시되고,loggi..

programing 2023.02.27
반응형