일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Spring
- ubuntu
- php
- Spring Boot
- jenkins
- jsp
- springboot
- tool
- Git
- Web Server
- elasticsearch
- linux
- AWS
- redis
- db
- IntelliJ
- Oracle
- devops
- Design Patterns
- MySQL
- java
- 맛집
- docker
- Gradle
- it
- javascript
- JPA
- 요리
- laravel
- ReactJS
- Today
- Total
목록2019/06 (45)
아무거나
1. maven 처음시작 - mvn archetype:generate -DgroupId=com.qdillion -DartifactId=develop_test -Dpackage=com.qdillion.develop_test -Dversion=1.0-SNAPSHOT - 위 명령어에서 archetype:generate는 archetype 플러그인의 generate 골(Goal)이라는 것인데, 플러그인과 골은 지금은 몰라도 좋다. 그냥 프로젝트를 생성하는 옵션이라고 생각하면 된다. -D로 시작하는 것들은 생성할 프로젝트에 대한 정보를 나타내는 파라메터들이다. 각 파라메터는 다음을 의미한다. - groupId 프로젝트를 만드는 그룹, 조직, 회사 등을 나타내는 유일한 이름, 보통 자바 패키지처럼 URI를 거꾸로 ..
사용방법은 간단하다. 파일을 생성하고 아마존S3에 accesskey와 secretkey를 이용하여 권한을 얻고 파일을 업로드 하면된다. public class AWSService { private static final String BUCKET_NAME = "bucket_name"; private static final String ACCESS_KEY = "ACCESS_KEY"; private static final String SECRET_KEY = "SECRET_KEY"; private AmazonS3 amazonS3; public AWSService() { AWSCredentials awsCredentials = new BasicAWSCredentials(ACCESS_KEY, SECRET_KEY);..
// s3 bucket 가져오기 @Repository public class S3BucketService { private static String bucketName = "deploy.versioning"; private static String bucketFolderRoot = "project"; private static String accessKey = {accesskey}; private static String key = {key}; @Autowired private ProjectDAOServiceImpl deployDAOService; // 전체 버킷 조회 서비스 모델 public HashMap getS3Bucket() { ArrayList projectArr = new ArrayList()..
import java.utill.*; public class MapEx { // Map은 키값(K)와 Value(V)값을 선언 할 수 있다. Map myMap = new HashMap(); myMap.put(1, "JAVA"); myMap.put(2, "JSP"); myMap.put(3, "Servlet"); // myMap.containsKey (key값 검색해서 같은 키값이 있으면) if ( myMap.containsKey(1) ) { // 1번 키값에 해당하는 value를 리턴함 String str = myMap.get(1); System.out.println(str); } System.out.println("\n====================="); // values() : Map 타입의 ..
import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class DateCompare { public static void main(String [] args) { SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); Date day1 = null; Date day2 = null; try { day1 = format.parse("2012-12-16"); day2 = format.parse("2012-12-17"); } catch (ParseException e) { e.printStackTrace(); } int compare..
String to Date String from = "2013-04-08 10:10:10"; SimpleDateFormat transFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date to = transFormat.parse(from); Date to String Date from = new Date(); SimpleDateFormat transFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String to = transFormat.format(from);
*** mysql(mariaDB)+Spring 연결 1. pom.xml 라이브러리 추가 mysql mysql-connector-java 5.1.39 org.springframework spring-jdbc ${org.springframework-version} org.springframework spring-test ${org.springframework-version} 2. webapp/WEB-INF/spring/root-context.xml 수정 - root-context.xml 하단 namespaces 탭에서 (aop, beans, context, jdbc) 체크 - source탭에서 위에 namespaces 추가된 애들 확인 xmlns:aop="http://www.springframework.or..
java.util.Date date = new Date("Sat Dec 01 00:00:00 GMT 2012"); SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); // yyyy-MM-dd HH:mm:ss String format = formatter.format(date); System.out.println(format);
[코드예제] import java.text.SimpleDateFormat; import java.util.Calendar; Calendar cal = Calendar.getInstance(); cal.add(Calendar.DATE, 1); SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd"); // Output "Wed Sep 26 14:23:28 EST 2012" System.out.println(cal.getTime()); String formatted = format1.format(cal.getTime()); // Output "2012-09-26" System.out.println(formatted); // Output "Wed Sep 2..
1. pom.xml 추가 org.codehaus.jackson jackson-mapper-asl 1.7.1 2. 컨트롤러 추가 @RequestMapping(value="/s3Bucket/{bucketName}", method= RequestMethod.GET) public @ResponseBody S3Bucket getS3Bucket(@PathVariable String bucketName) { S3Bucket s3Bucket = new S3Bucket(); s3Bucket.setBucketName(bucketName); return s3Bucket; } 3. 모델 추가(getter/setter 생성자) package com.deploy.model; public class S3Bucket { String..