본문 바로가기

설정

자바가 먼저냐 스프링이 먼저냐 사람이 먼저냐...

코딩이 먼저다....(타이핑 수준이지만은........ 쿨....럭..... 참 스프링이 아니고 스프링부트)

자바잘알... 자잘알이라 스프링을 하는 거면 좋겟지만은..... 나같은 우둔한 사람에게 자바 마스터 후 스프링을 해보자. 이것도 아닌거같고.........일단 인프런의 스프링 강의를 들어보기로. ㅇㅇ 



<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>me.ohoroyoi</groupId>
<artifactId>spring-boot-getting-started</artifactId>
<version>1.0-SNAPSHOT</version>

<!-- Inherit defaults from Spring Boot -->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.3.RELEASE</version>
</parent>

<!-- Add typical dependencies for a web application -->
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>

<!-- Package as an executable jar -->
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

</project>

https://docs.spring.io/spring-boot/docs/2.1.3.RELEASE/reference/htmlsingle/#getting-started-maven-installation

일단 여기를 참고한 ..... 수수하고 단조로운 maven 설정을....꾸려주었다.

다 이렇게 살림 시작하는거야~! 숟가락 몇개 놓고!~




package me.ohoroyoi;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import javax.swing.*;

@SpringBootApplication
public class Application {

public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}

런을 해줍니다 ㅋ




원래 타겟이 없던 폴더에서 타겟 생겨벌여~~~



 mvn package

해주면은

이런 구조에서




jar 파일 생성된것을 확인할수있다 





 java -jar target/spring-boot-getting-started-1.0-SNAPSHOT.jar



그리고 그  jar파일을 실행할수도있다 이거야~!~!







'설정' 카테고리의 다른 글

intelliJ change font size using material theme  (0) 2019.05.13
목업 툴 추천  (0) 2019.04.20
pom.xml 과 lombok plugin  (0) 2019.03.07
push to docker private registry from docker hub image  (0) 2019.02.28
apache superset start with Docker  (0) 2019.02.22