?? ????? Spring Boot 3? ?? ??? ??? ? Product ??? CRUD(Create, Read, Update, Delete) ??? ???? ? ??? ???????. ? ???? ?? Spring Boot ??? .NET Core ??? ???? .NET ???? Java ???? ???? ? ??? ??? ?????.
???? ??
???? ?? ?? ???? ?? Spring Boot ????? ???? ??? ?????.
- Spring Web: REST API ???.
- Spring Data JPA: ?????? ?????.
- PostgreSQL ????: PostgreSQL ?????? ???.
Docker? ???? ???? PostgreSQL ??
PostgreSQL? ???? ????? Docker? ???? ????? ??? ?????.
-
PostgreSQL ??? ????:
docker pull postgres
-
PostgreSQL ???? ??:
docker run --name postgres-db -e POSTGRES_PASSWORD=yourpassword -e POSTGRES_USER=yourusername -e POSTGRES_DB=mydatabase -p 5432:5432 -d postgres
yourusername, yourpassword ? mydatabase? ??? ??? ??, ???? ? ?????? ???? ????.
-
??????? ?? ??? ?????.
docker ps
?????? ?????(?: DBeaver, pgAdmin ?? psql)? ???? localhost:5432? ???? ??????? ???? ? ??? ?????.
pom.xml ?? ????
Maven? ???? ?? pom.xml ??? ?? ???? ???? ??? ?? ?????? ??? ? ??? ?????.
<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-jpa</artifactId> </dependency> <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> <version>42.5.0</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> </dependencies>
?? ???? ??? ?? ?? ????? ???? ??? ?????.
<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build>
.NET Core?? ??:
.NET Core?? ??? ??? csproj ??? ???? ?????. PostgreSQL ?? ? API? ?? ??? ???? ??? ????.
<ItemGroup> <PackageReference Include="Microsoft.AspNetCore.App" /> <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.0" /> </ItemGroup>
PostgreSQL ?????? ??
PostgreSQL ??????? ????? application.yml ??? ???????.
spring: datasource: url: jdbc:postgresql://localhost:5432/mydatabase username: yourusername password: yourpassword jpa: properties: hibernate: dialect: org.hibernate.dialect.PostgreSQLDialect hibernate: ddl-auto: update
mydatabase, yourusername ? yourpassword? ?? PostgreSQL ?????? ?? ??? ????. ddl-auto=update ??? Hibernate? ??? ??? ?? ???? ???? ????? ??????? ?????.
.NET Core?? ??:
.NET Core??? ??? ??? appsettings.json? ????.
{ "ConnectionStrings": { "DefaultConnection": "Host=localhost;Database=mydatabase;Username=yourusername;Password=yourpassword" }, "EntityFramework": { "MigrationsAssembly": "YourProjectName" } }
???? ?? ??
Spring Boot ????? ??? ???? ?????.
- ???: ??? ??? ?????.
- ???: ?????? ??? ?? ?????
- ????: REST ?????.
- ???(?? ??): ???? ??
? ??? .NET Core ????? ???? ??? ??, ???/?????, ???? ? ???? ?????.
1??: ?? ?? ??
Spring Boot?? ???? Entity Framework Core? ??? ???? ?????? ???? ?????. @Entity ? @Id? ?? ??? ???? ???? ???? ?????.
docker pull postgres
.NET Core? ??
docker run --name postgres-db -e POSTGRES_PASSWORD=yourpassword -e POSTGRES_USER=yourusername -e POSTGRES_DB=mydatabase -p 5432:5432 -d postgres
2??: ??? ??
Spring Boot?? ???? JpaRepository? ???? ????????. EF Core? DbContext? ??? ?? CRUD ??? ?????.
docker ps
.NET Core? ??
<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-jpa</artifactId> </dependency> <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> <version>42.5.0</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> </dependencies>
3??: ??? ?? ??(?? ??)
??? ??? ???? ??? ?????. ??????? ??? ???????? ?? ?????.
<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build>
.NET Core? ??
<ItemGroup> <PackageReference Include="Microsoft.AspNetCore.App" /> <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.0" /> </ItemGroup>
4??: ???? ??
????? ASP.NET Core??? ????? HTTP ??? ?????.
spring: datasource: url: jdbc:postgresql://localhost:5432/mydatabase username: yourusername password: yourpassword jpa: properties: hibernate: dialect: org.hibernate.dialect.PostgreSQLDialect hibernate: ddl-auto: update
.NET Core? ??
{ "ConnectionStrings": { "DefaultConnection": "Host=localhost;Database=mydatabase;Username=yourusername;Password=yourpassword" }, "EntityFramework": { "MigrationsAssembly": "YourProjectName" } }
5??: API ???
Postman ?? cURL? ?? ??? ???? ??????? ???? ?????? ??????. PostgreSQL ??????? ?? ??? ???? ???? ??? ?????.
??????? ???? Postman ?? cURL? ???? CRUD ?????? ??????. PostgreSQL? ?? ??? ???? ?????? ?????.
Postman?? ????? ???:
- GET /api/products: ?? ??? ?????.
- GET /api/products/{id}: ID?? ?? ??? ?????.
- POST /api/products: ? ??? ????.
- DELETE /api/products/{id}: ID?? ??? ?????.
?? ??
Feature | Spring Boot 3 | .NET Core |
---|---|---|
Dependency Injection | Built-in with @Autowired or constructor injection | Built-in with AddScoped, AddSingleton |
ORM Tool | Spring Data JPA | Entity Framework Core |
Routing | @RequestMapping, @GetMapping | [Route], [HttpGet] |
Middleware | Spring Interceptors | ASP.NET Middleware |
Response Handling | ResponseEntity | IActionResult |
??
Spring Boot?? CRUD ??????? ??? ?? ?? .NET Core? ??? ?????? ?????. ??? ??, ORM ? RESTful API? ??? ? ????? ?????. ? ???? ??? ????. ?? ?????? Lombok ??, Swagger/OpenAPI, ??? ??, ?? ?? ? ?????? ??????? ?? ?????. ?? ??????!
??? ?????!
????
- ??? ?? ??: https://spring.io/projects/spring-boot
- PostgreSQL ??: https://www.postgresql.org/docs/
- Spring ??? JPA ??: https://spring.io/projects/spring-data-jpa
- .NET Core ???: https://docs.microsoft.com/en-us/aspnet/core/?view=aspnetcore-7.0
? ??? Spring Boot ?? .NET ??? ???? ?? Spring Boot?? ?? ??? CRUD ?????? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

??? ??











?? ?? ?? ??? ??? ?? ??? ??, ? ? ?? ? ??? ?????. 1. ??? ?? ???? ?? ???? ???-????, ? ??? ??? ??? ? ????, Hashmap? ???-??? ?? ??? ??? ???? ????. 2. NULL ? ?? ???? HashMap? ??? NULL ?? ?? ? ?? ???? ?? HashTable? NULL ?? ?? ???? ??? NullPointerException? ?????. 3. ????? ??? ????? ?? ??? ?? ?? ? ????? HashTable? ? ??? ?? ?? ??? ????. ?? ConcurrenTashMap? ???? ?? ????.

Java? ?? ??? ??? ?? ??? ??? ?? ??? ??? ?? ??? ?? ?? ??? ???? ??? ?? ???? ?????. 1. ??? ???? ??? ?? ?? ? ???? ?? ??? ???? ?? ?? ??? ? ????. 2. ???? ?? ??? ???? ??? ?? ???? ?? ?? ??? ???????. 3. ?? ???? ?? ?? ?? ? ???? ???? ?? NULL ?? ??? ? ????. 4. ?? ???? ??? ?? ?? ? ??? ?????? ?? ??? ??? ?? ?? ??? ????? ??? ??? ??? ??????? ?? ???? ??????.

JIT ????? ??? ???, ??? ?? ? ???, ?? ?? ? ???? ? ? ?? ?? ??? ? ?? ??? ?? ??? ??????. 1. ??? ???? ?? ?? ??? ??? ?? ?? ???? ??? ?? ?????. 2. ??? ?? ? ??? ?? ?? ? ??? ???? ?? ?? ???; 3. ?? ??? ??? ?? ??? ???? ???? ???? ? ?? ?? ??? ?????. 4. ?? ??? ?? ??? ??? ???? ???? ?? ? ??? ???? ?? ??? ?????.

staticmethodsininterfaceswereIntRectionSelffacesswithinteffaceswithinteffaceswithintintinjava8toallowutilityFunctionswithinterfaceitswithinteffaceswithinterfaceffaces

???? ??? ??? Java?? ??? ?? ???? ??? ?? ? ? ??? ??? ???? ? ?????. ?? ???? ??? ??, ??? ?? ??? ?? ?? ??? ??? ????? ???? ????? ?????. ?? ??? ??? ??, ????? ? ??? ????, ?? ??? ??? ?????? ? ?? ? ?? ?????.

injava, thefinalkeywordpreventsavariable'svalue'svalueffrombeingchangedafterassignment, butitsbehaviordiffersforprimitivesandobjectreences.forprimitivevariables, asinfinalintmax_speed = 100; wherereassoncesanerror.forobjectref

??? ??? ?? ?? ??? ????? ? ???? ????? ???? ?? ???? ?? ???? ?????. ?? ??? ??? ????. ?? ?? ?? ??? ???? ???? ?? ?? ??? ??? ?? ?? ??? ??? ?????. ?? ??? ??? ????. ?? ??? ?? ??? ?? ?? ??? ?? ?? ??? ???? NewClass ()? ??? ?? ???? ????. ?? ??? ?? ??? ???? ?? ??? ?? ? ? ??? ?? ?? ??? ????? ????? ?????. ?? ??, ?? ?????? ?????, ??? ? ?? ????? ??? ?? ?????. ???? ?? ?? ??? ???? ?? ???? ?? ? ??? ???? ?? ??? ?? ?????? ?????. ???? ???? ??? ??, ?? ?? ? ?? ??? ????, ?? ?? ???? ?????.

??? ? ?? ??? ???? : ????? ?? ?. 1. int? ???? ???? ?? ?? ?? ? ??? ???? ?????. 2. ?? ? ???? (int) myDouble ??? ?? ?? ??? ?????. ?? ??? ??? ?? ??? ?? ??, ?? ?? ?? ???? ?? ??? ?? ???? ?? ?????. ???? ? ??? ??? ????. ?? ??? ??? ??? ??? ??? ?? ??? ??? ? ??? ?? ???? ??? ??? ??? ??? ? ??? ?? ??? ?? ??? ?? ?? ? ? ????. ?? ?? ??? ?? ??? ??? ??? ??? ? ??????.
