├── README.md ├── src ├── main │ ├── java │ │ └── ru │ │ │ └── practicum │ │ │ └── shareit │ │ │ ├── user │ │ │ ├── User.java │ │ │ └── UserController.java │ │ │ ├── booking │ │ │ ├── Booking.java │ │ │ ├── dto │ │ │ │ └── BookingDto.java │ │ │ └── BookingController.java │ │ │ ├── item │ │ │ ├── model │ │ │ │ └── Item.java │ │ │ ├── dto │ │ │ │ └── ItemDto.java │ │ │ └── ItemController.java │ │ │ ├── request │ │ │ ├── ItemRequest.java │ │ │ ├── dto │ │ │ │ └── ItemRequestDto.java │ │ │ └── ItemRequestController.java │ │ │ └── ShareItApp.java │ └── resources │ │ ├── application-test.properties │ │ └── application.properties └── test │ └── java │ └── ru │ └── practicum │ └── shareit │ └── ShareItTests.java ├── lombok.config ├── .github └── workflows │ └── api-tests.yml ├── suppressions.xml ├── .gitignore ├── pom.xml └── checkstyle.xml /README.md: -------------------------------------------------------------------------------- 1 | # java-shareit 2 | Template repository for Shareit project. 3 | -------------------------------------------------------------------------------- /src/main/java/ru/practicum/shareit/user/User.java: -------------------------------------------------------------------------------- 1 | package ru.practicum.shareit.user; 2 | 3 | /** 4 | * TODO Sprint add-controllers. 5 | */ 6 | public class User { 7 | } 8 | -------------------------------------------------------------------------------- /lombok.config: -------------------------------------------------------------------------------- 1 | config.stopBubbling = true 2 | lombok.anyconstructor.addconstructorproperties = false 3 | lombok.addLombokGeneratedAnnotation = true 4 | lombok.addSuppressWarnings = false -------------------------------------------------------------------------------- /src/main/java/ru/practicum/shareit/booking/Booking.java: -------------------------------------------------------------------------------- 1 | package ru.practicum.shareit.booking; 2 | 3 | /** 4 | * TODO Sprint add-bookings. 5 | */ 6 | public class Booking { 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/ru/practicum/shareit/item/model/Item.java: -------------------------------------------------------------------------------- 1 | package ru.practicum.shareit.item.model; 2 | 3 | /** 4 | * TODO Sprint add-controllers. 5 | */ 6 | public class Item { 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/ru/practicum/shareit/item/dto/ItemDto.java: -------------------------------------------------------------------------------- 1 | package ru.practicum.shareit.item.dto; 2 | 3 | /** 4 | * TODO Sprint add-controllers. 5 | */ 6 | public class ItemDto { 7 | } 8 | -------------------------------------------------------------------------------- /.github/workflows/api-tests.yml: -------------------------------------------------------------------------------- 1 | name: ShareIt API Tests 2 | 3 | on: 4 | pull_request: 5 | 6 | jobs: 7 | build: 8 | uses: yandex-praktikum/java-shareit/.github/workflows/api-tests.yml@ci -------------------------------------------------------------------------------- /src/main/java/ru/practicum/shareit/booking/dto/BookingDto.java: -------------------------------------------------------------------------------- 1 | package ru.practicum.shareit.booking.dto; 2 | 3 | /** 4 | * TODO Sprint add-bookings. 5 | */ 6 | public class BookingDto { 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/ru/practicum/shareit/request/ItemRequest.java: -------------------------------------------------------------------------------- 1 | package ru.practicum.shareit.request; 2 | 3 | /** 4 | * TODO Sprint add-item-requests. 5 | */ 6 | public class ItemRequest { 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/ru/practicum/shareit/request/dto/ItemRequestDto.java: -------------------------------------------------------------------------------- 1 | package ru.practicum.shareit.request.dto; 2 | 3 | /** 4 | * TODO Sprint add-item-requests. 5 | */ 6 | public class ItemRequestDto { 7 | } 8 | -------------------------------------------------------------------------------- /src/test/java/ru/practicum/shareit/ShareItTests.java: -------------------------------------------------------------------------------- 1 | package ru.practicum.shareit; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class ShareItTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /suppressions.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/main/java/ru/practicum/shareit/item/ItemController.java: -------------------------------------------------------------------------------- 1 | package ru.practicum.shareit.item; 2 | 3 | import org.springframework.web.bind.annotation.RequestMapping; 4 | import org.springframework.web.bind.annotation.RestController; 5 | 6 | /** 7 | * TODO Sprint add-controllers. 8 | */ 9 | @RestController 10 | @RequestMapping("/items") 11 | public class ItemController { 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/ru/practicum/shareit/user/UserController.java: -------------------------------------------------------------------------------- 1 | package ru.practicum.shareit.user; 2 | 3 | import org.springframework.web.bind.annotation.RequestMapping; 4 | import org.springframework.web.bind.annotation.RestController; 5 | 6 | /** 7 | * TODO Sprint add-controllers. 8 | */ 9 | @RestController 10 | @RequestMapping(path = "/users") 11 | public class UserController { 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/ru/practicum/shareit/ShareItApp.java: -------------------------------------------------------------------------------- 1 | package ru.practicum.shareit; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class ShareItApp { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(ShareItApp.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/ru/practicum/shareit/booking/BookingController.java: -------------------------------------------------------------------------------- 1 | package ru.practicum.shareit.booking; 2 | 3 | import org.springframework.web.bind.annotation.RequestMapping; 4 | import org.springframework.web.bind.annotation.RestController; 5 | 6 | /** 7 | * TODO Sprint add-bookings. 8 | */ 9 | @RestController 10 | @RequestMapping(path = "/bookings") 11 | public class BookingController { 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/ru/practicum/shareit/request/ItemRequestController.java: -------------------------------------------------------------------------------- 1 | package ru.practicum.shareit.request; 2 | 3 | import org.springframework.web.bind.annotation.RequestMapping; 4 | import org.springframework.web.bind.annotation.RestController; 5 | 6 | /** 7 | * TODO Sprint add-item-requests. 8 | */ 9 | @RestController 10 | @RequestMapping(path = "/requests") 11 | public class ItemRequestController { 12 | } 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/**/target/ 5 | !**/src/test/**/target/ 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | !**/src/main/**/build/ 30 | !**/src/test/**/build/ 31 | 32 | ### VS Code ### 33 | .vscode/ 34 | -------------------------------------------------------------------------------- /src/main/resources/application-test.properties: -------------------------------------------------------------------------------- 1 | spring.jpa.hibernate.ddl-auto=none 2 | spring.jpa.properties.hibernate.format_sql=true 3 | spring.sql.init.mode=always 4 | logging.level.org.springframework.orm.jpa=INFO 5 | logging.level.org.springframework.transaction=INFO 6 | logging.level.org.springframework.transaction.interceptor=TRACE 7 | logging.level.org.springframework.orm.jpa.JpaTransactionManager=DEBUG 8 | 9 | # TODO Append connection to H2 DB 10 | #spring.datasource.driverClassName 11 | #spring.datasource.url 12 | #spring.datasource.username 13 | #spring.datasource.password 14 | -------------------------------------------------------------------------------- /src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.jpa.hibernate.ddl-auto=none 2 | spring.jpa.properties.hibernate.format_sql=true 3 | spring.sql.init.mode=always 4 | 5 | logging.level.org.springframework.orm.jpa=INFO 6 | logging.level.org.springframework.transaction=INFO 7 | logging.level.org.springframework.transaction.interceptor=TRACE 8 | logging.level.org.springframework.orm.jpa.JpaTransactionManager=DEBUG 9 | 10 | # TODO Append connection to Postgres DB 11 | #spring.datasource.driverClassName 12 | #spring.datasource.url 13 | #spring.datasource.username 14 | #spring.datasource.password 15 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 3.3.2 9 | 10 | 11 | 12 | ru.practicum 13 | shareit 14 | 0.0.1-SNAPSHOT 15 | 16 | ShareIt 17 | 18 | 19 | 21 20 | 21 | 22 | 23 | 24 | org.springframework.boot 25 | spring-boot-starter-web 26 | 27 | 28 | org.springframework.boot 29 | spring-boot-starter-actuator 30 | 31 | 32 | org.springframework.boot 33 | spring-boot-configuration-processor 34 | true 35 | 36 | 37 | 38 | org.postgresql 39 | postgresql 40 | runtime 41 | 42 | 43 | 44 | org.projectlombok 45 | lombok 46 | true 47 | 48 | 49 | 50 | com.h2database 51 | h2 52 | test 53 | 54 | 55 | org.springframework.boot 56 | spring-boot-starter-test 57 | test 58 | 59 | 60 | org.springframework.boot 61 | spring-boot-starter-validation 62 | 63 | 64 | 65 | 66 | 67 | 68 | src/main/resources 69 | true 70 | 71 | 72 | 73 | 74 | org.springframework.boot 75 | spring-boot-maven-plugin 76 | 77 | 78 | 79 | org.projectlombok 80 | lombok 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | org.apache.maven.plugins 90 | maven-surefire-plugin 91 | 92 | 93 | test 94 | 95 | 96 | 97 | 98 | org.apache.maven.plugins 99 | maven-checkstyle-plugin 100 | 3.1.2 101 | 102 | checkstyle.xml 103 | true 104 | true 105 | true 106 | 107 | 108 | 109 | 110 | check 111 | 112 | compile 113 | 114 | 115 | 116 | 117 | com.puppycrawl.tools 118 | checkstyle 119 | 10.3 120 | 121 | 122 | 123 | 124 | com.github.spotbugs 125 | spotbugs-maven-plugin 126 | 4.8.5.0 127 | 128 | Max 129 | High 130 | 131 | 132 | 133 | 134 | check 135 | 136 | 137 | 138 | 139 | 140 | org.jacoco 141 | jacoco-maven-plugin 142 | 0.8.12 143 | 144 | file 145 | 146 | 147 | 148 | jacoco-initialize 149 | 150 | prepare-agent 151 | 152 | 153 | 154 | jacoco-check 155 | 156 | check 157 | 158 | 159 | 160 | 161 | BUNDLE 162 | 163 | 164 | INSTRUCTION 165 | COVEREDRATIO 166 | 0.01 167 | 168 | 169 | LINE 170 | COVEREDRATIO 171 | 0.9 172 | 173 | 174 | BRANCH 175 | COVEREDRATIO 176 | 0.6 177 | 178 | 179 | COMPLEXITY 180 | COVEREDRATIO 181 | 0.6 182 | 183 | 184 | METHOD 185 | COVEREDRATIO 186 | 0.7 187 | 188 | 189 | CLASS 190 | MISSEDCOUNT 191 | 1 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | jacoco-report 200 | test 201 | 202 | report 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | check 213 | 214 | 215 | 216 | org.apache.maven.plugins 217 | maven-checkstyle-plugin 218 | 219 | 220 | com.github.spotbugs 221 | spotbugs-maven-plugin 222 | 223 | 224 | 225 | 226 | 227 | 228 | com.github.spotbugs 229 | spotbugs-maven-plugin 230 | 231 | 232 | 233 | 234 | 235 | coverage 236 | 237 | 238 | 239 | org.jacoco 240 | jacoco-maven-plugin 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | -------------------------------------------------------------------------------- /checkstyle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | --------------------------------------------------------------------------------