When a bean has a single constructor, @Autowired annotation is no longer needed. Use 'final' to make sure that object is not changed after it's initialized However, for Setter injection, you need @Autowired. private final UsersRepository usersRepository; private final ModelMapper modelMapper; //@Autowired public UsersController(UsersRepository usersRepository, ModelMapper modelMapper){ this.user..
ModelMapper enables to convert DTO to an entity.DTO를 이용 id 값을 드러내지 않게한다.사용된 DTO를 entity(User class) 로 다시 변경하기위해 ModelMapper를 사용 You need to add ModelMapper bean at @SpringBootApplication. It let us use ModelMapper in different classes. ModelMapper @Bean을 @SpringBootApplication에 등록한다. @SpringBootApplication public class DemoApplication { public static void main(String[] args) { SpringApplication...
create a new git repository 새로운 git저장소 생성 git init To add new remote내가 만든 원격저장소 추가 git remote add origin [URI] add new changes to a staging area local repository 에 untracked이 확인되면 staging area 에 add하기 git add . //everyfile git add "file name" // single file adding changes to the local repository local repository 에 변경사항 추가. 코드에 변화가 있으면 local에 commit을 한 뒤에 push를 해야한다. git commit -a -m "commit mess..
StringBuffer StringBuffer class is rewritable, unlike String class which is not allowed to change itself once it is declared. String is immutable. Methods of StringBuffer class 1. append123StringBuffer sb = new StringBuffer("Hello "); sb.append("StringBuffer"); // add new stringSystem.out.println(sb);//prints Hello StringBuffer cs 2. insert123StringBuffer sb = new StringBuffer("Hello "); sb.inse..
Model-View-Controller pattern MVC pattern 은 보통 user interface를 말한다. Service/DAO는 이 MVC layer들을 server side까지 연장시키는 역할 을 한다. Application 의 관계들을 서로 분리시키기 위해서 사용되는 architectural pattern 이다. View- Controller 의 하위 종속자로 Controller가 화면에 무언가를 보여주기 위해 사용 Controller - 사용자에게 model에 있는 것을 표현- 사용자로 부터 정보를 받아 model을 update하는 것 Model - 해당 application 이 무엇을 하는지 말해주는 것e.g. Calculator app 이라면 model 은 계산 파트를 담당
문제 설명 프로그래머스 모바일은 개인정보 보호를 위해 고지서를 보낼 때 고객들의 전화번호의 일부를 가립니다.전화번호가 문자열 phone_number로 주어졌을 때, 전화번호의 뒷 4자리를 제외한 나머지 숫자를 전부 *으로 가린 문자열을 리턴하는 함수, solution을 완성해주세요. 제한 조건 s는 길이 4 이상, 20이하인 문자열입니다. 입출력 예 phone_number return 01033334444 *******4444 027778888 *****8888 Solution in Java 1 2 3 4 5 6 7 8 9 class Solution { public String solution(String phone_number) { String answer = ""; for(int i=0; i 4 ? ..
- Total
- Today
- Yesterday
- 알고리즘
- compareTo()
- rest parameter
- hackerrank javascript solution
- ... in Javascript
- string class in java
- Object type casting
- 프로그래머스 알고리즘
- algorithm
- 프로그래머스 알고리즘문제
- Collection Framework
- substring()
- java
- code refactoring
- hackerrank
- easy javascript algorithm
- javascript
- 프로그래머스
- math.abs
- C++
- HashMap
- hackerrank solution
- math.max
- easy algorithm
- HackerRank Algorithm
- repeat()
- equals()
- hackerrank javascript
- Javascript Algorithm
- spring boot application
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |