상품 이미지 추가

This commit is contained in:
kimscott
2019-09-05 16:03:50 +09:00
parent 7f4cbc6dec
commit 3cacf53fd2
7 changed files with 6 additions and 1 deletions

View File

@@ -20,6 +20,10 @@
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-rest</artifactId>

View File

@@ -24,7 +24,8 @@ public class Application {
product.setName(p);
product.setPrice(i*10000);
product.setStock(i*10);
product.setImageUrl("https://github.githubassets.com/images/modules/profile/profile-joined-github.png");
product.setImageUrl("/goods/img/"+p+".jpg");
// product.setImageUrl("https://github.githubassets.com/images/modules/profile/profile-joined-github.png");
i++;
productRepository.save(product);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB