2024-06-12
This commit is contained in:
6
Writerside/c.list
Normal file
6
Writerside/c.list
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE categories
|
||||||
|
SYSTEM "https://resources.jetbrains.com/writerside/1.0/categories.dtd">
|
||||||
|
<categories>
|
||||||
|
<category id="wrs" name="Writerside documentation" order="1"/>
|
||||||
|
</categories>
|
||||||
17
Writerside/cfg/buildprofiles.xml
Normal file
17
Writerside/cfg/buildprofiles.xml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
~ Copyright (c) 2024. Elex. All Rights Reesrved.
|
||||||
|
~ https://www.elex-project.com/
|
||||||
|
-->
|
||||||
|
|
||||||
|
<buildprofiles xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/build-profiles.xsd"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
|
||||||
|
<variables></variables>
|
||||||
|
<build-profile instance="sb">
|
||||||
|
<variables>
|
||||||
|
<noindex-content>true</noindex-content>
|
||||||
|
</variables>
|
||||||
|
</build-profile>
|
||||||
|
|
||||||
|
</buildprofiles>
|
||||||
BIN
Writerside/images/completion_procedure.png
Normal file
BIN
Writerside/images/completion_procedure.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 125 KiB |
BIN
Writerside/images/completion_procedure_dark.png
Normal file
BIN
Writerside/images/completion_procedure_dark.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 67 KiB |
BIN
Writerside/images/convert_table_to_xml.png
Normal file
BIN
Writerside/images/convert_table_to_xml.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 341 KiB |
BIN
Writerside/images/convert_table_to_xml_dark.png
Normal file
BIN
Writerside/images/convert_table_to_xml_dark.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 119 KiB |
BIN
Writerside/images/new_topic_options.png
Normal file
BIN
Writerside/images/new_topic_options.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 306 KiB |
BIN
Writerside/images/new_topic_options_dark.png
Normal file
BIN
Writerside/images/new_topic_options_dark.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 274 KiB |
32
Writerside/sb.tree
Normal file
32
Writerside/sb.tree
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
- Copyright (c) 2024. Elex. All Rights Reesrved.
|
||||||
|
- https://www.elex-project.com/
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!DOCTYPE instance-profile
|
||||||
|
SYSTEM "https://resources.jetbrains.com/writerside/1.0/product-profile.dtd">
|
||||||
|
|
||||||
|
<instance-profile id="sb"
|
||||||
|
name="Spring Boot"
|
||||||
|
start-page="starter-topic.md">
|
||||||
|
|
||||||
|
<toc-element topic="starter-topic.md">
|
||||||
|
<toc-element topic="Controller.md"/>
|
||||||
|
<toc-element topic="Database.md">
|
||||||
|
<toc-element topic="Modeling.md"/>
|
||||||
|
<toc-element topic="JPA.md">
|
||||||
|
<toc-element topic="Repository.md"/>
|
||||||
|
<toc-element topic="JPQL.md"/>
|
||||||
|
<toc-element topic="Paging.md"/>
|
||||||
|
</toc-element>
|
||||||
|
</toc-element>
|
||||||
|
<toc-element topic="Validation.md"/>
|
||||||
|
<toc-element topic="Testing.md"/>
|
||||||
|
<toc-element topic="Security.md">
|
||||||
|
<toc-element topic="JWT.md"/>
|
||||||
|
</toc-element>
|
||||||
|
<toc-element topic="Actuator.md"/>
|
||||||
|
<toc-element topic="Swagger.md"/>
|
||||||
|
</toc-element>
|
||||||
|
</instance-profile>
|
||||||
10
Writerside/sbe.tree
Normal file
10
Writerside/sbe.tree
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE instance-profile
|
||||||
|
SYSTEM "https://resources.jetbrains.com/writerside/1.0/product-profile.dtd">
|
||||||
|
|
||||||
|
<instance-profile id="sbe"
|
||||||
|
name="Spring Boot Explained"
|
||||||
|
start-page="starter-topic.md">
|
||||||
|
|
||||||
|
<toc-element topic="starter-topic.md"/>
|
||||||
|
</instance-profile>
|
||||||
3
Writerside/topics/Actuator.md
Normal file
3
Writerside/topics/Actuator.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# Actuator
|
||||||
|
|
||||||
|
Start typing here...
|
||||||
19
Writerside/topics/Controller.md
Normal file
19
Writerside/topics/Controller.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# Controller
|
||||||
|
|
||||||
|
## URI 맵핑
|
||||||
|
|
||||||
|
* @Controller
|
||||||
|
* @RestController
|
||||||
|
* @RequestMapping
|
||||||
|
* @GetMapping
|
||||||
|
* @PostMapping
|
||||||
|
* @PutMapping
|
||||||
|
* @DeleteMapping
|
||||||
|
|
||||||
|
|
||||||
|
## 매개변수
|
||||||
|
|
||||||
|
* @PathVariable
|
||||||
|
* @RequestParam
|
||||||
|
* @RequestBody
|
||||||
|
|
||||||
26
Writerside/topics/Database.md
Normal file
26
Writerside/topics/Database.md
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
# Database
|
||||||
|
|
||||||
|
## 설정
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
spring:
|
||||||
|
datasource:
|
||||||
|
driverClassName: org.mariadb.jdbc.Driver
|
||||||
|
url: jdbc:mariadb://localhost:3306/mydb
|
||||||
|
username: root
|
||||||
|
password: password
|
||||||
|
jpa:
|
||||||
|
hibernate:
|
||||||
|
ddl-auto: create
|
||||||
|
show-sql: true
|
||||||
|
properties:
|
||||||
|
hibernate:
|
||||||
|
format_sql: true
|
||||||
|
```
|
||||||
|
|
||||||
|
### DDL Auto
|
||||||
|
* create : 애플리케이션이 실행되고, SessionFactory가 실행될 때, 기존의 테이블을 지우고 새로운 테이블을 생성합니다.
|
||||||
|
* create-drop : 'create'와 유사하지만, 애플리케이션 종료 시점에 테이블을 지웁니다.
|
||||||
|
* update : SessionFactory가 실행될 때, 객체를 검사한 다음, 변경된 스키마를 갱신합니다. 기존의 데이터는 유지됩니다.
|
||||||
|
* validate : 'update'와 유사하게 객체를 검사하지만, 스키마를 변경하지 않으며, 테이블 구조가 수정된 경우에는 에러가 발생합니다.
|
||||||
|
* none : dll-auto 기능을 사용하지 않습니다.
|
||||||
3
Writerside/topics/JPA.md
Normal file
3
Writerside/topics/JPA.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# JPA
|
||||||
|
|
||||||
|
Start typing here...
|
||||||
3
Writerside/topics/JPQL.md
Normal file
3
Writerside/topics/JPQL.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# JPQL
|
||||||
|
|
||||||
|
JPQL은 맵핑된 엔티티 객체를 대상으로 수행되므로, 쿼리문에는 엔티티의 이름과 필드의 이름을 사용합니다.
|
||||||
3
Writerside/topics/JWT.md
Normal file
3
Writerside/topics/JWT.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# JWT
|
||||||
|
|
||||||
|
Start typing here...
|
||||||
32
Writerside/topics/Modeling.md
Normal file
32
Writerside/topics/Modeling.md
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# Modeling
|
||||||
|
|
||||||
|
## 어노태이션
|
||||||
|
|
||||||
|
* @Entity : 해당 클래스가 엔티티임을 명시합니다.
|
||||||
|
* @Table : 클래스의 이름과 테이블의 이름을 다르게 지정해야 할 경우에 사용합니다.
|
||||||
|
* name
|
||||||
|
|
||||||
|
* @Id : 테이블의 기본키를 지정합니다. 모든 엔티티는 @Id가 필요합니다.
|
||||||
|
* @GeneratedValue : 일반적으로 @Id와 함께 사용됩니다. 해당 필드의 값을 자동으로 생성하는 방식을 지정합니다.
|
||||||
|
* strategy
|
||||||
|
|
||||||
|
* @Column : 테이블의 칼럼으로 맵핑됩니다.
|
||||||
|
* name : 데이터베이스의 칼럼명을 지정합니다.
|
||||||
|
* unique : 고유키로 지정합니다.
|
||||||
|
* nullable : 널 처리 가능여부를 지정합니다.
|
||||||
|
* insertable
|
||||||
|
* updatable
|
||||||
|
* columnDefinition
|
||||||
|
* table
|
||||||
|
* length : 데이터의 최대 길이를 지정합니다.
|
||||||
|
* precision
|
||||||
|
* scale
|
||||||
|
* @Transient : 클래스에는 선언되어 있지만, 데이터베이스에는 필요 없는 경우에 지정합니다.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### GenerationType
|
||||||
|
* AUTO : 사용하는 데이터베이스에 맞게 자동으로 생성합니다.
|
||||||
|
* IDENTITY : AUTI_INCREMENT를 사용해서, 데이터베이스가 알아서 생성하도록 합니다.
|
||||||
|
* SEQUENCE : @SequenceGenerator로 지정된 식별자 생성기를 통해서 값을 주입받습니다.
|
||||||
|
* TABLE : @TableGenerator를 사용해서 별도의 테이블에 값을 저장합니다.
|
||||||
3
Writerside/topics/Paging.md
Normal file
3
Writerside/topics/Paging.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# Paging
|
||||||
|
|
||||||
|
Start typing here...
|
||||||
33
Writerside/topics/Repository.md
Normal file
33
Writerside/topics/Repository.md
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
# Repository
|
||||||
|
|
||||||
|
JpaRepository > PagingAndSortingRepository > CrudRepository > Repository
|
||||||
|
|
||||||
|
## JpaRepository
|
||||||
|
|
||||||
|
```java
|
||||||
|
@Repository
|
||||||
|
public interface MyRepository extends JpaRepository<MyEntity, Long> {
|
||||||
|
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## 메서드 이름 규칙
|
||||||
|
|
||||||
|
* findBy, readBy, getBy, queryBu, searchBy, streamBy
|
||||||
|
* and, or
|
||||||
|
* isLike, isNotLike
|
||||||
|
* is, isNot
|
||||||
|
* startsWith, isStartingWith
|
||||||
|
* endsWith, isEndingWith
|
||||||
|
* contains, isContaining
|
||||||
|
* isNull, isNotNull
|
||||||
|
* isTrue, isFalse
|
||||||
|
* before, after
|
||||||
|
* isLessThan, isGreaterThan
|
||||||
|
* isBetween
|
||||||
|
* orderBy
|
||||||
|
* first, top
|
||||||
|
* countBy
|
||||||
|
* existsBy
|
||||||
|
* deleteBy, removeBy
|
||||||
3
Writerside/topics/Security.md
Normal file
3
Writerside/topics/Security.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# Security
|
||||||
|
|
||||||
|
Start typing here...
|
||||||
38
Writerside/topics/Swagger.md
Normal file
38
Writerside/topics/Swagger.md
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
# Swagger
|
||||||
|
|
||||||
|
## 설정
|
||||||
|
|
||||||
|
### 의존성 추가
|
||||||
|
```kotlin
|
||||||
|
implementation("io.springfox:springfox-swagger2:2.9.2")
|
||||||
|
implementation("io.springfox:springfox-swagger-ui:2.9.2")
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
### 설정 코드 추가
|
||||||
|
|
||||||
|
```java
|
||||||
|
import jdk.javadoc.doclet.Doclet;
|
||||||
|
|
||||||
|
import java.beans.BeanProperty;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
@EnableSwagger2
|
||||||
|
public class MyConfiguration {
|
||||||
|
@Bean
|
||||||
|
public Doclet api(){
|
||||||
|
return new Docket(DocumentationType.SWAGGER_2)
|
||||||
|
...
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## 어노태이션
|
||||||
|
|
||||||
|
* @ApiOperation : 해당 API에 대한 설정을 작성합니다.
|
||||||
|
* value
|
||||||
|
* notes
|
||||||
|
* @ApiParam : 해당 API의 매개변수에 대한 설명 및 설정을 지정합니다.
|
||||||
|
* value
|
||||||
|
* required
|
||||||
3
Writerside/topics/Testing.md
Normal file
3
Writerside/topics/Testing.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# Testing
|
||||||
|
|
||||||
|
Start typing here...
|
||||||
3
Writerside/topics/Validation.md
Normal file
3
Writerside/topics/Validation.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# Validation
|
||||||
|
|
||||||
|
Start typing here...
|
||||||
1
Writerside/topics/starter-topic.md
Normal file
1
Writerside/topics/starter-topic.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
# Spring Boot
|
||||||
5
Writerside/v.list
Normal file
5
Writerside/v.list
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE vars SYSTEM "https://resources.jetbrains.com/writerside/1.0/vars.dtd">
|
||||||
|
<vars>
|
||||||
|
<var name="product" value="Writerside"/>
|
||||||
|
</vars>
|
||||||
13
Writerside/writerside.cfg
Normal file
13
Writerside/writerside.cfg
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
- Copyright (c) 2024. Elex. All Rights Reesrved.
|
||||||
|
- https://www.elex-project.com/
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!DOCTYPE ihp SYSTEM "https://resources.jetbrains.com/writerside/1.0/ihp.dtd">
|
||||||
|
|
||||||
|
<ihp version="2.0">
|
||||||
|
<topics dir="topics" web-path="topics"/>
|
||||||
|
<images dir="images" web-path="images"/>
|
||||||
|
<instance src="sb.tree"/>
|
||||||
|
</ihp>
|
||||||
@@ -12,7 +12,7 @@ buildscript {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath ("com.jaredsburrows:gradle-license-plugin:0.8.90")
|
classpath ("com.jaredsburrows:gradle-license-plugin:0.9.7")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
plugins {
|
plugins {
|
||||||
|
|||||||
@@ -71,6 +71,6 @@ tasks.javadoc {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
||||||
implementation("org.jetbrains:annotations:24.0.0")
|
implementation("org.jetbrains:annotations:24.1.0")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,6 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies{
|
dependencies{
|
||||||
//implementation("org.jetbrains:annotations:24.0.0")
|
//implementation("org.jetbrains:annotations:24.1.0")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -7,6 +7,6 @@
|
|||||||
|
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
@@ -14,11 +14,11 @@ plugins {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// https://mvnrepository.com/artifact/io.jsonwebtoken/jjwt-api
|
// https://mvnrepository.com/artifact/io.jsonwebtoken/jjwt-api
|
||||||
implementation("io.jsonwebtoken:jjwt-api:0.11.2")
|
implementation("io.jsonwebtoken:jjwt-api:0.12.5")
|
||||||
|
|
||||||
// https://mvnrepository.com/artifact/io.jsonwebtoken/jjwt-impl
|
// https://mvnrepository.com/artifact/io.jsonwebtoken/jjwt-impl
|
||||||
runtimeOnly("io.jsonwebtoken:jjwt-impl:0.11.2")
|
runtimeOnly("io.jsonwebtoken:jjwt-impl:0.12.5")
|
||||||
runtimeOnly("io.jsonwebtoken:jjwt-jackson:0.11.2")
|
runtimeOnly("io.jsonwebtoken:jjwt-jackson:0.12.5")
|
||||||
|
|
||||||
implementation("org.springframework.boot:spring-boot-starter-mustache")
|
implementation("org.springframework.boot:spring-boot-starter-mustache")
|
||||||
implementation("org.springframework.boot:spring-boot-starter-web")
|
implementation("org.springframework.boot:spring-boot-starter-web")
|
||||||
|
|||||||
Reference in New Issue
Block a user