본문 바로가기

반응형

Java

(4)
Spring Boot application.properties 값 가져오기 application.properties 에 있는 값을 가져오는 테스트를 진행해보겠습니다. 테스트해볼 값을 입력해줍니다. application.properties test.value=TESTVALUE test.value.int=123456789 TestController.java @Slf4j @RestController public class TestController { @Value("${test.value}") private String testValue; @Value("${test.value}") private static String testValue2; @Value("${test.value.int}") private int testValueInt; @Value("${test.value.int}"..
[STS] SpringBoot Database postgreSQL JDBC 연동(Hibernate, JPA, SLF4J2 + Log4j2) 1. local postgreSQL 환경 설정 postgreSQL설치 superuser(postgres) password 설정 시 잊어버리시면 안됩니다. 기본 포트 : 5432 https://www.postgresql.org/download/ PostgreSQL: Downloads www.postgresql.org DBeaver 설치 https://dbeaver.io/download/ Download | DBeaver Community Download Tested and verified for MS Windows, Linux and Mac OS X. Install: Windows installer – run installer executable. It will automatically upgrade ve..
[JAVA Logging] SLF4J(Simple Logging Facade for Java)란 무엇일까 Simple Logging Facade for Java의 약자로 로깅 프레임워크(ex: logback, log4j)에 대해 추상화 역할을 합니다. 최종 배포 시 사용자가 원하는 로깅 프레임워크로 배포할 수 있게 되는데 Facade에서 의미를 찾을 수 있습니다. 소프트웨어 공학 디자인 패턴에서는 크게 생성, 구조, 행위 패턴으로 나눌 수 있는데, Facade Pattern은 그 중 구조패턴에 속합니다. Facade Pattern 특징 서브 클래스들의 기능들을 미리 구현해놓고, 상위의 인터페이스를 제공함으로써 복잡한 로직을 알 필요가 없어진다. 인터페이스에만 접근하면 되므로 사용성이 용이하고, 사용자 또는 시스템끼리의 결합도를 낮춰 의존성이 감소된다. 따라서, 시스템의 복잡성을 감추고, 사용자가 시스템에 접..
[STS] Spring Boot Maven Project Create(메이븐을 이용한 스프링부트 프로젝트 생성) 1. STS 설치 https://spring.io/tools Spring Tools 4 is the next generation of Spring tooling Largely rebuilt from scratch, Spring Tools 4 provides world-class support for developing Spring-based enterprise applications, whether you prefer Eclipse, Visual Studio Code, or Theia IDE. spring.io 2. File > New > Project... 3. Maven Project 4. maven-archetype-webapp 검색 > Group Id : org.apache.maven.archet..

반응형