본문 바로가기

Web/Springboot

(4)
[Springboot] hide API KEY (feat. MySQL) API KEY나 secret string등 유출되면 안되는 정보들은 public에 올리면 위험하므로 항상 push하기 전에 두 번 세 번 확인해야한다. react.js나 node.js에서는 .gitignore와 .env로 해결했었는데 springboot에서도 유사한 방법들이 있다. 프로젝트 도중에 앱이 실행되기만 하고 DBMS에 schema가 안생겨서 열심히 해결하던 중 생각난 김에 정리하게 되었다. JPA설정을 제대로 안한건지 mapping을 잘못한건지 여러가지 헛다리만 짚었는데 결론적으로 spring.profile.include 한 줄을 작성안해서 발생.. 교훈: API 다 확인했고 Entity에도 문제없는데 안되면 property 파일도 꼭 확인하기! 1. gitignore, application-..
Spring Boot Annotations (in-progress) Spring Data JPA @Id, @GeneratedValue(strategy = GenerationType.AUTO) - set column as a Id value and automatically increase it @Column(nullable = false) - set member variable as a column of table (entity), indicates Required column @CreatedDate, @LastModifiedDate - Used to keep track of created and modified dates and times of entities @MappedSuperclass - Designates a class whose mapping informati..
Java Spring - RDBMS, Spring Data JPA, Service, DTO, RestController, Lombok Week02 contents RDBMS - H2, MySQL JPA, Repository interface Service, DTO (Data Transfer Object) CRUD, RestController Annotation, Lombok RDBMS - Relational DB Management System A type of database anagement system (DBMS) that stores data in a row-based table structure which connects related data elements. H2 Database an open-source light weight java database, mainly run as in-memory DB, which mean..
Java Spring - Java basic, class, Getter, Setter, Gradle (MavenRepository) Build web server API with Java Spring boot using InteliJ IDE InteliJ IDE 기본 설정 InteliJ shortcuts & initial settings align code Ctrl + Alt + L Import Alt + Enter System.out.println() sout Preferences(setting) Ctrl + Alt + S indent a block tab outdent a block shift + tab Insert imports on paste: Always ✅ Add unambigugous imports on the fly install monokai plugin Spring project initialization New P..