2
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【Spring】pom.xmlファイルの初期設定の方法

Posted at

pom.xmlに追加するコード

以下のコードをpom.xmlに追加
【注】こちらのコードは自分用のメモとして記載するものです。必要なものは適宜追加してください。

pom.xml
<!-- urlタグの下を以下のコードに修正(コピー&ペースト) -->
<!-- ここから貼り付け -->
  
  <!-- 基本 -->
  <parent>
  	<groupId>org.springframework.boot</groupId> 
  	<artifactId>spring-boot-starter-parent</artifactId>
  	<version>1.2.3.RELEASE</version>
  </parent>
  
  <dependencies>
  
	  <!-- web -->
	    <dependency>
			<groupId>org.springframework.boot</groupId> 
			<artifactId>spring-boot-starter-web</artifactId>
	    </dependency>
	    
	  <!-- test -->
	    <dependency>
			<groupId>org.springframework.boot</groupId> 
			<artifactId>spring-boot-starter-test</artifactId>
			<scope>test</scope>
	    </dependency>
	    
	  <!-- jsp -->	    
	    <dependency>
        	<groupId>org.apache.tomcat.embed</groupId>
        	<artifactId>tomcat-embed-jasper</artifactId>
        	<scope>provided</scope>
		</dependency>

	  <!-- jstl -->
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>jstl</artifactId>
		</dependency>

	  <!-- lombok -->		
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<version>1.14.0</version>
			<scope>provided</scope>
		</dependency>
		
	  <!-- JDBC -->		
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-jdbc</artifactId>
		</dependency>

	  <!-- PostgreSQL -->		
		<dependency>
			<groupId>org.postgresql</groupId>
			<artifactId>postgresql</artifactId>
			<version>9.4.1207</version>
		</dependency>
		
  </dependencies>
  
  <!-- maven plugin -->
  <build>
  	<plugins>
  		<plugin>
			<groupId>org.springframework.boot</groupId> 
			<artifactId>spring-boot-maven-plugin</artifactId>  			
  		</plugin>
  	</plugins>
  </build>
  
  <properties>
  	<!-- java version -->
  	<java.version>1.8</java.version>
  </properties>
</project>
2
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?