Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
product-management-svc
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mbdk-tot
product-management-svc
Commits
128b014c
Commit
128b014c
authored
May 23, 2025
by
Thaswin Muralikaran
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'thaswin' into 'master'
Updated readme file See merge request
!5
parents
2f9fdb47
4ec171d2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
README.md
README.md
+11
-8
No files found.
README.md
View file @
128b014c
...
@@ -107,7 +107,7 @@ my-product-management-svc
...
@@ -107,7 +107,7 @@ my-product-management-svc
-
In the application.properties file under the resources folder add the database configuration.
-
In the application.properties file under the resources folder add the database configuration.
```
```
java properties
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/productmngm?createDatabaseIfNotExist=true&useSSL=false&serverTimezone=UTC
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/productmngm?createDatabaseIfNotExist=true&useSSL=false&serverTimezone=UTC
spring.datasource.username=root
spring.datasource.username=root
spring.datasource.password=01234
spring.datasource.password=01234
...
@@ -131,7 +131,7 @@ spring.jpa.hibernate.ddl-auto=update
...
@@ -131,7 +131,7 @@ spring.jpa.hibernate.ddl-auto=update
##### i. Importing packages and classes
##### i. Importing packages and classes
```
```
java
package
com
.
ctsb
.
my_product_management_svc
.
category
;
package
com
.
ctsb
.
my_product_management_svc
.
category
;
import
com.ctsb.my_product_management_svc.product.Product
;
import
com.ctsb.my_product_management_svc.product.Product
;
...
@@ -148,7 +148,7 @@ import java.util.List;
...
@@ -148,7 +148,7 @@ import java.util.List;
##### ii. Adding annotations
##### ii. Adding annotations
```
```
java
@Getter
@Getter
@Setter
@Setter
@Entity
@Entity
...
@@ -157,7 +157,7 @@ import java.util.List;
...
@@ -157,7 +157,7 @@ import java.util.List;
##### iii. Defining class and fields
##### iii. Defining class and fields
```
```
java
public
class
Category
{
public
class
Category
{
@Id
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
...
@@ -183,7 +183,7 @@ public class Category {
...
@@ -183,7 +183,7 @@ public class Category {
##### i. Importing packages and classes
##### i. Importing packages and classes
```
```
java
package
com
.
ctsb
.
my_product_management_svc
.
product
;
package
com
.
ctsb
.
my_product_management_svc
.
product
;
import
com.ctsb.my_product_management_svc.category.Category
;
import
com.ctsb.my_product_management_svc.category.Category
;
...
@@ -197,7 +197,7 @@ import java.time.LocalDateTime;
...
@@ -197,7 +197,7 @@ import java.time.LocalDateTime;
##### ii. Adding annotations
##### ii. Adding annotations
```
```
java
@Getter
@Getter
@Setter
@Setter
@Entity
@Entity
...
@@ -206,7 +206,7 @@ import java.time.LocalDateTime;
...
@@ -206,7 +206,7 @@ import java.time.LocalDateTime;
##### iii. Defining class and fields
##### iii. Defining class and fields
```
```
java
public
class
Product
{
public
class
Product
{
@Id
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
...
@@ -243,7 +243,7 @@ public enum Status {
...
@@ -243,7 +243,7 @@ public enum Status {
##### v. Declaring relationship between category and product
##### v. Declaring relationship between category and product
```
```
java
//Declare one-to-many relationship to product in category
//Declare one-to-many relationship to product in category
@OneToMany
(
mappedBy
=
"category"
,
orphanRemoval
=
true
)
@OneToMany
(
mappedBy
=
"category"
,
orphanRemoval
=
true
)
@JsonIgnore
@JsonIgnore
...
@@ -259,6 +259,7 @@ public enum Status {
...
@@ -259,6 +259,7 @@ public enum Status {
<summary>
Full code of category entity
</summary>
<summary>
Full code of category entity
</summary>
```
java
```
java
package
com
.
ctsb
.
my_product_management_svc
.
category
;
package
com
.
ctsb
.
my_product_management_svc
.
category
;
import
com.ctsb.my_product_management_svc.product.Product
;
import
com.ctsb.my_product_management_svc.product.Product
;
...
@@ -307,6 +308,7 @@ private Long id;
...
@@ -307,6 +308,7 @@ private Long id;
<summary>
Full code of product entity
</summary>
<summary>
Full code of product entity
</summary>
```
java
```
java
package
com
.
ctsb
.
my_product_management_svc
.
product
;
package
com
.
ctsb
.
my_product_management_svc
.
product
;
import
com.ctsb.my_product_management_svc.category.Category
;
import
com.ctsb.my_product_management_svc.category.Category
;
...
@@ -345,6 +347,7 @@ public class Product {
...
@@ -345,6 +347,7 @@ public class Product {
@JoinColumn
(
name
=
"category_id"
,
nullable
=
false
)
@JoinColumn
(
name
=
"category_id"
,
nullable
=
false
)
private
Category
category
;
private
Category
category
;
}
}
```
```
</details>
</details>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment