├── .gitignore
├── README.md
└── blog-app
├── HELP.md
├── README.md
├── mvnw
├── mvnw.cmd
├── pom.xml
├── src
├── main
│ ├── java
│ │ └── com
│ │ │ └── dcankayrak
│ │ │ └── blogapp
│ │ │ ├── BlogAppApplication.java
│ │ │ ├── business
│ │ │ ├── abstracts
│ │ │ │ ├── CategoryService.java
│ │ │ │ ├── CommentService.java
│ │ │ │ ├── PostService.java
│ │ │ │ └── UserService.java
│ │ │ └── concretes
│ │ │ │ ├── CategoryManager.java
│ │ │ │ ├── CommentManager.java
│ │ │ │ ├── PostManager.java
│ │ │ │ └── UserManager.java
│ │ │ ├── controller
│ │ │ ├── CategoryController.java
│ │ │ ├── CommentController.java
│ │ │ └── PostController.java
│ │ │ ├── entities
│ │ │ ├── Category.java
│ │ │ ├── Comment.java
│ │ │ ├── Post.java
│ │ │ └── User.java
│ │ │ ├── repositories
│ │ │ ├── CategoryRepository.java
│ │ │ ├── CommentRepository.java
│ │ │ ├── PostRepository.java
│ │ │ └── UserRepository.java
│ │ │ ├── requests
│ │ │ ├── CommentCreateRequest.java
│ │ │ ├── PostCreateRequest.java
│ │ │ ├── PostUpdateRequest.java
│ │ │ ├── UserCreateRequest.java
│ │ │ └── UserUpdateRequest.java
│ │ │ └── responses
│ │ │ └── PostResponse.java
│ └── resources
│ │ └── application.properties
└── test
│ └── java
│ └── com
│ └── dcankayrak
│ └── blogapp
│ └── BlogAppApplicationTests.java
└── target
├── classes
├── META-INF
│ ├── MANIFEST.MF
│ └── maven
│ │ └── com.dcankayrak
│ │ └── blog-app
│ │ ├── pom.properties
│ │ └── pom.xml
├── application.properties
└── com
│ └── dcankayrak
│ └── blogapp
│ ├── BlogAppApplication.class
│ ├── business
│ ├── abstracts
│ │ ├── CategoryService.class
│ │ ├── CommentService.class
│ │ ├── PostService.class
│ │ └── UserService.class
│ └── concretes
│ │ ├── CategoryManager.class
│ │ ├── CommentManager.class
│ │ ├── PostManager.class
│ │ └── UserManager.class
│ ├── controller
│ ├── CategoryController.class
│ ├── CommentController.class
│ └── PostController.class
│ ├── entities
│ ├── Category.class
│ ├── Comment.class
│ ├── Post.class
│ └── User.class
│ ├── repositories
│ ├── CategoryRepository.class
│ ├── CommentRepository.class
│ ├── PostRepository.class
│ └── UserRepository.class
│ ├── requests
│ ├── CommentCreateRequest.class
│ ├── PostCreateRequest.class
│ ├── PostUpdateRequest.class
│ ├── UserCreateRequest.class
│ └── UserUpdateRequest.class
│ └── responses
│ └── PostResponse.class
└── test-classes
└── com
└── dcankayrak
└── blogapp
└── BlogAppApplicationTests.class
/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled class file
2 | *.class
3 |
4 | # Log file
5 | *.log
6 |
7 | # BlueJ files
8 | *.ctxt
9 |
10 | # Mobile Tools for Java (J2ME)
11 | .mtj.tmp/
12 |
13 | # Package Files #
14 | *.jar
15 | *.war
16 | *.nar
17 | *.ear
18 | *.zip
19 | *.tar.gz
20 | *.rar
21 |
22 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
23 | hs_err_pid*
24 | replay_pid*
25 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Kişisel Blog Sitesi - Backend
2 | 🎉 Artık her yazılım geliştirici / yazılım mühendisinin kendine özel bir blog sitesi olacak.
3 |
4 | 🎯 Bu projemdeki asıl amacım uzunca bir süredir backend alanında kendimi geliştirirken hep front taraflarında dönen olayları merakım üzerine reactı öğrenmem, html ve css temellerimi ve react, javascript bilgilerimi üst düzeye çıkartırken güzel bir deneyim elde etmekti. Ve böyle de oldu :)
5 |
6 | Bu projede backend tarafında Java,Java SpringBoot teknolojilerini kullanarak PostgreSQL ile de verilerimi depoladım.
7 |
8 | ❗Bu proje sayesinde aslında fullstack bir uygulamanın geliştirirken ne gibi aşamalardan geçiyor, nerede ne nasıl yapılıyor gibi sorulara cevap bulma fırsatı buldum. Bir önceki kişisel özgeçmiş sitesine göre çıtayı bir üst seviyeye bu proje ile taşıdığımı düşünüyorum. Fakat bununla da yetinmeyeceğim :)
9 |
10 | ### Projenin Kurulumu
11 | ---
12 | Projemizin bilgisayarda çalışması için proje dosyalarını indirebilirsiniz. İndirdikten sonra istediğiniz bir klasöre göre konumlandırınız. Sonrasında ise bir IDE ile açabilirsiniz. Ben tercihimi Eclipse'den yana kullandım. Proje klasörünü ide ile açtıktan sonra tek yapmanız gereken projenin herhangi bir sınıfına gidip yukarıdaki yeşil çalıştır butonuna tıklamak.
13 |
14 | ❗ Yukarıdaki anlatım ile projenizi çalıştırmadan önce, application.properties isimli dosyanın içerisindeki gerekli PostgreSQL konfigürasyonlarını yapmanız gereklidir.
15 |
16 | ### API's PATHS
17 | ---
18 |
19 | ##### Post Service API Paths
20 | - For Get All Posts `GET localhost:8080/api/posts/`
21 | - For Get Post By Id `GET localhost:8080/api/posts/{postId}`
22 | - For Get Post By Category Id `GET localhost:8080/api/posts/category/{categoryId}`
23 | - For Post A Post `POST localhost:8080/api/posts/`
24 | - For Update A Posts By Id `PUT localhost:8080/api/posts/{postId}`
25 | - For Delete A Posts `DELETE localhost:8080/api/posts/{postId}`
26 |
27 | ##### Comment Service API Paths
28 | - For Get All Comment `GET localhost:8080/api/comments/`
29 | - For Get Comment By Id `GET localhost:8080/api/comments/{commentId}`
30 | - For Get Comment By Post Id `GET localhost:8080/api/comments/post/{postId}`
31 | - For Post A Comment `POST localhost:8080/api/comments/`
32 | - For Update A Comment By Id `PUT localhost:8080/api/comments/{commentId}`
33 | - For Delete A Comment By Id `DELETE localhost:8080/api/comments/{commentId}`
34 |
35 | ##### Category Service API Paths
36 | - For Get All Categories `GET localhost:8080/api/categories/`
37 | - For Get Category By Id `GET localhost:8080/api/categories/{categoryId}`
38 | - For Post A Category `POST localhost:8080/api/categories/`
39 | - For Update A Category By Id `PUT localhost:8080/api/categories/{categoryId}`
40 | - For Delete A Category By Id `DELETE localhost:8080/api/categories/{categoryId}`
41 |
42 | ### Projemizden alıntılar
43 | ---
44 | 
45 | 
46 | 
47 | 
48 | 
49 |
50 |
51 |
52 | ### ☎️ İletişim
53 | ---
54 | [Projenin Backend Linki](https://github.com/DCanKayrak/Resume-Website)
55 |
56 | [Github Hesabım](https://github.com/DCanKayrak)
57 | [LinkedIn Hesabım](https://www.linkedin.com/in/danyal-can-kayrak/)
58 | [Mail Adresim](dancankan@gmail.com)
59 |
--------------------------------------------------------------------------------
/blog-app/HELP.md:
--------------------------------------------------------------------------------
1 | # Read Me First
2 | The following was discovered as part of building this project:
3 |
4 | * The original package name 'com.dcankayrak.blog-app' is invalid and this project uses 'com.dcankayrak.blogapp' instead.
5 |
6 | # Getting Started
7 |
8 | ### Reference Documentation
9 | For further reference, please consider the following sections:
10 |
11 | * [Official Apache Maven documentation](https://maven.apache.org/guides/index.html)
12 | * [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/3.0.5/maven-plugin/reference/html/)
13 | * [Create an OCI image](https://docs.spring.io/spring-boot/docs/3.0.5/maven-plugin/reference/html/#build-image)
14 | * [Spring Web](https://docs.spring.io/spring-boot/docs/3.0.5/reference/htmlsingle/#web)
15 | * [Spring Data JPA](https://docs.spring.io/spring-boot/docs/3.0.5/reference/htmlsingle/#data.sql.jpa-and-spring-data)
16 |
17 | ### Guides
18 | The following guides illustrate how to use some features concretely:
19 |
20 | * [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/)
21 | * [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/)
22 | * [Building REST services with Spring](https://spring.io/guides/tutorials/rest/)
23 | * [Accessing Data with JPA](https://spring.io/guides/gs/accessing-data-jpa/)
24 |
25 |
--------------------------------------------------------------------------------
/blog-app/README.md:
--------------------------------------------------------------------------------
1 | # test
2 |
--------------------------------------------------------------------------------
/blog-app/mvnw:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # ----------------------------------------------------------------------------
3 | # Licensed to the Apache Software Foundation (ASF) under one
4 | # or more contributor license agreements. See the NOTICE file
5 | # distributed with this work for additional information
6 | # regarding copyright ownership. The ASF licenses this file
7 | # to you under the Apache License, Version 2.0 (the
8 | # "License"); you may not use this file except in compliance
9 | # with the License. You may obtain a copy of the License at
10 | #
11 | # https://www.apache.org/licenses/LICENSE-2.0
12 | #
13 | # Unless required by applicable law or agreed to in writing,
14 | # software distributed under the License is distributed on an
15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | # KIND, either express or implied. See the License for the
17 | # specific language governing permissions and limitations
18 | # under the License.
19 | # ----------------------------------------------------------------------------
20 |
21 | # ----------------------------------------------------------------------------
22 | # Maven Start Up Batch script
23 | #
24 | # Required ENV vars:
25 | # ------------------
26 | # JAVA_HOME - location of a JDK home dir
27 | #
28 | # Optional ENV vars
29 | # -----------------
30 | # M2_HOME - location of maven2's installed home dir
31 | # MAVEN_OPTS - parameters passed to the Java VM when running Maven
32 | # e.g. to debug Maven itself, use
33 | # set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
34 | # MAVEN_SKIP_RC - flag to disable loading of mavenrc files
35 | # ----------------------------------------------------------------------------
36 |
37 | if [ -z "$MAVEN_SKIP_RC" ] ; then
38 |
39 | if [ -f /usr/local/etc/mavenrc ] ; then
40 | . /usr/local/etc/mavenrc
41 | fi
42 |
43 | if [ -f /etc/mavenrc ] ; then
44 | . /etc/mavenrc
45 | fi
46 |
47 | if [ -f "$HOME/.mavenrc" ] ; then
48 | . "$HOME/.mavenrc"
49 | fi
50 |
51 | fi
52 |
53 | # OS specific support. $var _must_ be set to either true or false.
54 | cygwin=false;
55 | darwin=false;
56 | mingw=false
57 | case "`uname`" in
58 | CYGWIN*) cygwin=true ;;
59 | MINGW*) mingw=true;;
60 | Darwin*) darwin=true
61 | # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
62 | # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
63 | if [ -z "$JAVA_HOME" ]; then
64 | if [ -x "/usr/libexec/java_home" ]; then
65 | export JAVA_HOME="`/usr/libexec/java_home`"
66 | else
67 | export JAVA_HOME="/Library/Java/Home"
68 | fi
69 | fi
70 | ;;
71 | esac
72 |
73 | if [ -z "$JAVA_HOME" ] ; then
74 | if [ -r /etc/gentoo-release ] ; then
75 | JAVA_HOME=`java-config --jre-home`
76 | fi
77 | fi
78 |
79 | if [ -z "$M2_HOME" ] ; then
80 | ## resolve links - $0 may be a link to maven's home
81 | PRG="$0"
82 |
83 | # need this for relative symlinks
84 | while [ -h "$PRG" ] ; do
85 | ls=`ls -ld "$PRG"`
86 | link=`expr "$ls" : '.*-> \(.*\)$'`
87 | if expr "$link" : '/.*' > /dev/null; then
88 | PRG="$link"
89 | else
90 | PRG="`dirname "$PRG"`/$link"
91 | fi
92 | done
93 |
94 | saveddir=`pwd`
95 |
96 | M2_HOME=`dirname "$PRG"`/..
97 |
98 | # make it fully qualified
99 | M2_HOME=`cd "$M2_HOME" && pwd`
100 |
101 | cd "$saveddir"
102 | # echo Using m2 at $M2_HOME
103 | fi
104 |
105 | # For Cygwin, ensure paths are in UNIX format before anything is touched
106 | if $cygwin ; then
107 | [ -n "$M2_HOME" ] &&
108 | M2_HOME=`cygpath --unix "$M2_HOME"`
109 | [ -n "$JAVA_HOME" ] &&
110 | JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
111 | [ -n "$CLASSPATH" ] &&
112 | CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
113 | fi
114 |
115 | # For Mingw, ensure paths are in UNIX format before anything is touched
116 | if $mingw ; then
117 | [ -n "$M2_HOME" ] &&
118 | M2_HOME="`(cd "$M2_HOME"; pwd)`"
119 | [ -n "$JAVA_HOME" ] &&
120 | JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
121 | fi
122 |
123 | if [ -z "$JAVA_HOME" ]; then
124 | javaExecutable="`which javac`"
125 | if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
126 | # readlink(1) is not available as standard on Solaris 10.
127 | readLink=`which readlink`
128 | if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
129 | if $darwin ; then
130 | javaHome="`dirname \"$javaExecutable\"`"
131 | javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
132 | else
133 | javaExecutable="`readlink -f \"$javaExecutable\"`"
134 | fi
135 | javaHome="`dirname \"$javaExecutable\"`"
136 | javaHome=`expr "$javaHome" : '\(.*\)/bin'`
137 | JAVA_HOME="$javaHome"
138 | export JAVA_HOME
139 | fi
140 | fi
141 | fi
142 |
143 | if [ -z "$JAVACMD" ] ; then
144 | if [ -n "$JAVA_HOME" ] ; then
145 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
146 | # IBM's JDK on AIX uses strange locations for the executables
147 | JAVACMD="$JAVA_HOME/jre/sh/java"
148 | else
149 | JAVACMD="$JAVA_HOME/bin/java"
150 | fi
151 | else
152 | JAVACMD="`\\unset -f command; \\command -v java`"
153 | fi
154 | fi
155 |
156 | if [ ! -x "$JAVACMD" ] ; then
157 | echo "Error: JAVA_HOME is not defined correctly." >&2
158 | echo " We cannot execute $JAVACMD" >&2
159 | exit 1
160 | fi
161 |
162 | if [ -z "$JAVA_HOME" ] ; then
163 | echo "Warning: JAVA_HOME environment variable is not set."
164 | fi
165 |
166 | CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
167 |
168 | # traverses directory structure from process work directory to filesystem root
169 | # first directory with .mvn subdirectory is considered project base directory
170 | find_maven_basedir() {
171 |
172 | if [ -z "$1" ]
173 | then
174 | echo "Path not specified to find_maven_basedir"
175 | return 1
176 | fi
177 |
178 | basedir="$1"
179 | wdir="$1"
180 | while [ "$wdir" != '/' ] ; do
181 | if [ -d "$wdir"/.mvn ] ; then
182 | basedir=$wdir
183 | break
184 | fi
185 | # workaround for JBEAP-8937 (on Solaris 10/Sparc)
186 | if [ -d "${wdir}" ]; then
187 | wdir=`cd "$wdir/.."; pwd`
188 | fi
189 | # end of workaround
190 | done
191 | echo "${basedir}"
192 | }
193 |
194 | # concatenates all lines of a file
195 | concat_lines() {
196 | if [ -f "$1" ]; then
197 | echo "$(tr -s '\n' ' ' < "$1")"
198 | fi
199 | }
200 |
201 | BASE_DIR=`find_maven_basedir "$(pwd)"`
202 | if [ -z "$BASE_DIR" ]; then
203 | exit 1;
204 | fi
205 |
206 | ##########################################################################################
207 | # Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
208 | # This allows using the maven wrapper in projects that prohibit checking in binary data.
209 | ##########################################################################################
210 | if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
211 | if [ "$MVNW_VERBOSE" = true ]; then
212 | echo "Found .mvn/wrapper/maven-wrapper.jar"
213 | fi
214 | else
215 | if [ "$MVNW_VERBOSE" = true ]; then
216 | echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
217 | fi
218 | if [ -n "$MVNW_REPOURL" ]; then
219 | jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
220 | else
221 | jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
222 | fi
223 | while IFS="=" read key value; do
224 | case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
225 | esac
226 | done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
227 | if [ "$MVNW_VERBOSE" = true ]; then
228 | echo "Downloading from: $jarUrl"
229 | fi
230 | wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
231 | if $cygwin; then
232 | wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
233 | fi
234 |
235 | if command -v wget > /dev/null; then
236 | if [ "$MVNW_VERBOSE" = true ]; then
237 | echo "Found wget ... using wget"
238 | fi
239 | if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
240 | wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
241 | else
242 | wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
243 | fi
244 | elif command -v curl > /dev/null; then
245 | if [ "$MVNW_VERBOSE" = true ]; then
246 | echo "Found curl ... using curl"
247 | fi
248 | if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
249 | curl -o "$wrapperJarPath" "$jarUrl" -f
250 | else
251 | curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
252 | fi
253 |
254 | else
255 | if [ "$MVNW_VERBOSE" = true ]; then
256 | echo "Falling back to using Java to download"
257 | fi
258 | javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
259 | # For Cygwin, switch paths to Windows format before running javac
260 | if $cygwin; then
261 | javaClass=`cygpath --path --windows "$javaClass"`
262 | fi
263 | if [ -e "$javaClass" ]; then
264 | if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
265 | if [ "$MVNW_VERBOSE" = true ]; then
266 | echo " - Compiling MavenWrapperDownloader.java ..."
267 | fi
268 | # Compiling the Java class
269 | ("$JAVA_HOME/bin/javac" "$javaClass")
270 | fi
271 | if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
272 | # Running the downloader
273 | if [ "$MVNW_VERBOSE" = true ]; then
274 | echo " - Running MavenWrapperDownloader.java ..."
275 | fi
276 | ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
277 | fi
278 | fi
279 | fi
280 | fi
281 | ##########################################################################################
282 | # End of extension
283 | ##########################################################################################
284 |
285 | export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
286 | if [ "$MVNW_VERBOSE" = true ]; then
287 | echo $MAVEN_PROJECTBASEDIR
288 | fi
289 | MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
290 |
291 | # For Cygwin, switch paths to Windows format before running java
292 | if $cygwin; then
293 | [ -n "$M2_HOME" ] &&
294 | M2_HOME=`cygpath --path --windows "$M2_HOME"`
295 | [ -n "$JAVA_HOME" ] &&
296 | JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
297 | [ -n "$CLASSPATH" ] &&
298 | CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
299 | [ -n "$MAVEN_PROJECTBASEDIR" ] &&
300 | MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
301 | fi
302 |
303 | # Provide a "standardized" way to retrieve the CLI args that will
304 | # work with both Windows and non-Windows executions.
305 | MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
306 | export MAVEN_CMD_LINE_ARGS
307 |
308 | WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
309 |
310 | exec "$JAVACMD" \
311 | $MAVEN_OPTS \
312 | $MAVEN_DEBUG_OPTS \
313 | -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
314 | "-Dmaven.home=${M2_HOME}" \
315 | "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
316 | ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
317 |
--------------------------------------------------------------------------------
/blog-app/mvnw.cmd:
--------------------------------------------------------------------------------
1 | @REM ----------------------------------------------------------------------------
2 | @REM Licensed to the Apache Software Foundation (ASF) under one
3 | @REM or more contributor license agreements. See the NOTICE file
4 | @REM distributed with this work for additional information
5 | @REM regarding copyright ownership. The ASF licenses this file
6 | @REM to you under the Apache License, Version 2.0 (the
7 | @REM "License"); you may not use this file except in compliance
8 | @REM with the License. You may obtain a copy of the License at
9 | @REM
10 | @REM https://www.apache.org/licenses/LICENSE-2.0
11 | @REM
12 | @REM Unless required by applicable law or agreed to in writing,
13 | @REM software distributed under the License is distributed on an
14 | @REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | @REM KIND, either express or implied. See the License for the
16 | @REM specific language governing permissions and limitations
17 | @REM under the License.
18 | @REM ----------------------------------------------------------------------------
19 |
20 | @REM ----------------------------------------------------------------------------
21 | @REM Maven Start Up Batch script
22 | @REM
23 | @REM Required ENV vars:
24 | @REM JAVA_HOME - location of a JDK home dir
25 | @REM
26 | @REM Optional ENV vars
27 | @REM M2_HOME - location of maven2's installed home dir
28 | @REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
29 | @REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
30 | @REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
31 | @REM e.g. to debug Maven itself, use
32 | @REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
33 | @REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
34 | @REM ----------------------------------------------------------------------------
35 |
36 | @REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
37 | @echo off
38 | @REM set title of command window
39 | title %0
40 | @REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
41 | @if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
42 |
43 | @REM set %HOME% to equivalent of $HOME
44 | if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
45 |
46 | @REM Execute a user defined script before this one
47 | if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
48 | @REM check for pre script, once with legacy .bat ending and once with .cmd ending
49 | if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
50 | if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
51 | :skipRcPre
52 |
53 | @setlocal
54 |
55 | set ERROR_CODE=0
56 |
57 | @REM To isolate internal variables from possible post scripts, we use another setlocal
58 | @setlocal
59 |
60 | @REM ==== START VALIDATION ====
61 | if not "%JAVA_HOME%" == "" goto OkJHome
62 |
63 | echo.
64 | echo Error: JAVA_HOME not found in your environment. >&2
65 | echo Please set the JAVA_HOME variable in your environment to match the >&2
66 | echo location of your Java installation. >&2
67 | echo.
68 | goto error
69 |
70 | :OkJHome
71 | if exist "%JAVA_HOME%\bin\java.exe" goto init
72 |
73 | echo.
74 | echo Error: JAVA_HOME is set to an invalid directory. >&2
75 | echo JAVA_HOME = "%JAVA_HOME%" >&2
76 | echo Please set the JAVA_HOME variable in your environment to match the >&2
77 | echo location of your Java installation. >&2
78 | echo.
79 | goto error
80 |
81 | @REM ==== END VALIDATION ====
82 |
83 | :init
84 |
85 | @REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
86 | @REM Fallback to current working directory if not found.
87 |
88 | set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
89 | IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
90 |
91 | set EXEC_DIR=%CD%
92 | set WDIR=%EXEC_DIR%
93 | :findBaseDir
94 | IF EXIST "%WDIR%"\.mvn goto baseDirFound
95 | cd ..
96 | IF "%WDIR%"=="%CD%" goto baseDirNotFound
97 | set WDIR=%CD%
98 | goto findBaseDir
99 |
100 | :baseDirFound
101 | set MAVEN_PROJECTBASEDIR=%WDIR%
102 | cd "%EXEC_DIR%"
103 | goto endDetectBaseDir
104 |
105 | :baseDirNotFound
106 | set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
107 | cd "%EXEC_DIR%"
108 |
109 | :endDetectBaseDir
110 |
111 | IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
112 |
113 | @setlocal EnableExtensions EnableDelayedExpansion
114 | for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
115 | @endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
116 |
117 | :endReadAdditionalConfig
118 |
119 | SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
120 | set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
121 | set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
122 |
123 | set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
124 |
125 | FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
126 | IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
127 | )
128 |
129 | @REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
130 | @REM This allows using the maven wrapper in projects that prohibit checking in binary data.
131 | if exist %WRAPPER_JAR% (
132 | if "%MVNW_VERBOSE%" == "true" (
133 | echo Found %WRAPPER_JAR%
134 | )
135 | ) else (
136 | if not "%MVNW_REPOURL%" == "" (
137 | SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
138 | )
139 | if "%MVNW_VERBOSE%" == "true" (
140 | echo Couldn't find %WRAPPER_JAR%, downloading it ...
141 | echo Downloading from: %DOWNLOAD_URL%
142 | )
143 |
144 | powershell -Command "&{"^
145 | "$webclient = new-object System.Net.WebClient;"^
146 | "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
147 | "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
148 | "}"^
149 | "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
150 | "}"
151 | if "%MVNW_VERBOSE%" == "true" (
152 | echo Finished downloading %WRAPPER_JAR%
153 | )
154 | )
155 | @REM End of extension
156 |
157 | @REM Provide a "standardized" way to retrieve the CLI args that will
158 | @REM work with both Windows and non-Windows executions.
159 | set MAVEN_CMD_LINE_ARGS=%*
160 |
161 | %MAVEN_JAVA_EXE% ^
162 | %JVM_CONFIG_MAVEN_PROPS% ^
163 | %MAVEN_OPTS% ^
164 | %MAVEN_DEBUG_OPTS% ^
165 | -classpath %WRAPPER_JAR% ^
166 | "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
167 | %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
168 | if ERRORLEVEL 1 goto error
169 | goto end
170 |
171 | :error
172 | set ERROR_CODE=1
173 |
174 | :end
175 | @endlocal & set ERROR_CODE=%ERROR_CODE%
176 |
177 | if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
178 | @REM check for post script, once with legacy .bat ending and once with .cmd ending
179 | if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
180 | if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
181 | :skipRcPost
182 |
183 | @REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
184 | if "%MAVEN_BATCH_PAUSE%"=="on" pause
185 |
186 | if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%
187 |
188 | cmd /C exit /B %ERROR_CODE%
189 |
--------------------------------------------------------------------------------
/blog-app/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 |
6 | org.springframework.boot
7 | spring-boot-starter-parent
8 | 3.0.5
9 |
10 |
11 | com.dcankayrak
12 | blog-app
13 | 0.0.1-SNAPSHOT
14 | blog-app
15 | Demo project for Spring Boot
16 |
17 | 17
18 |
19 |
20 |
21 | org.springframework.boot
22 | spring-boot-starter-data-jpa
23 |
24 |
25 | org.springframework.boot
26 | spring-boot-starter-web
27 |
28 |
29 |
30 | org.postgresql
31 | postgresql
32 | runtime
33 |
34 |
35 | org.projectlombok
36 | lombok
37 | true
38 |
39 |
40 | org.springframework.boot
41 | spring-boot-starter-test
42 | test
43 |
44 |
45 |
46 |
47 |
48 |
49 | org.springframework.boot
50 | spring-boot-maven-plugin
51 |
52 |
53 |
54 | org.projectlombok
55 | lombok
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/blog-app/src/main/java/com/dcankayrak/blogapp/BlogAppApplication.java:
--------------------------------------------------------------------------------
1 | package com.dcankayrak.blogapp;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class BlogAppApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(BlogAppApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/blog-app/src/main/java/com/dcankayrak/blogapp/business/abstracts/CategoryService.java:
--------------------------------------------------------------------------------
1 | package com.dcankayrak.blogapp.business.abstracts;
2 |
3 | import java.util.List;
4 |
5 | import com.dcankayrak.blogapp.entities.Category;
6 |
7 | public interface CategoryService {
8 | List getCategories();
9 | Category getCategory(int id);
10 | Category createCategory(Category theCategory);
11 | Category updateCategory(int id,Category theCategory);
12 | void deleteCategory(int id);
13 | }
14 |
--------------------------------------------------------------------------------
/blog-app/src/main/java/com/dcankayrak/blogapp/business/abstracts/CommentService.java:
--------------------------------------------------------------------------------
1 | package com.dcankayrak.blogapp.business.abstracts;
2 |
3 | import java.util.List;
4 |
5 | import com.dcankayrak.blogapp.entities.Comment;
6 | import com.dcankayrak.blogapp.requests.CommentCreateRequest;
7 |
8 | public interface CommentService {
9 | List getComments();
10 | List getCommentsWithPostId(int postId);
11 | Comment getComment(int id);
12 | Comment createComment(CommentCreateRequest createComment);
13 | void deleteComment(int id);
14 | }
15 |
--------------------------------------------------------------------------------
/blog-app/src/main/java/com/dcankayrak/blogapp/business/abstracts/PostService.java:
--------------------------------------------------------------------------------
1 | package com.dcankayrak.blogapp.business.abstracts;
2 |
3 | import java.util.List;
4 |
5 | import com.dcankayrak.blogapp.entities.Post;
6 | import com.dcankayrak.blogapp.requests.PostCreateRequest;
7 | import com.dcankayrak.blogapp.requests.PostUpdateRequest;
8 |
9 | public interface PostService {
10 | List getAllPosts();
11 | Post getPost(int id);
12 | Post createPost(PostCreateRequest postRequest);
13 | Post updatePost(int id,PostUpdateRequest thePost);
14 | void deletePost(int id);
15 | List findByCategoryId(int categoryId);
16 | }
17 |
--------------------------------------------------------------------------------
/blog-app/src/main/java/com/dcankayrak/blogapp/business/abstracts/UserService.java:
--------------------------------------------------------------------------------
1 | package com.dcankayrak.blogapp.business.abstracts;
2 |
3 | import java.util.List;
4 |
5 | import com.dcankayrak.blogapp.entities.User;
6 | import com.dcankayrak.blogapp.requests.UserCreateRequest;
7 | import com.dcankayrak.blogapp.requests.UserUpdateRequest;
8 |
9 | public interface UserService {
10 | List getUsers();
11 | User getUser(int id);
12 | User createUser(UserCreateRequest createUser);
13 | User updateUser(int id,UserUpdateRequest updateUser);
14 | void deleteUser(int id);
15 | }
16 |
--------------------------------------------------------------------------------
/blog-app/src/main/java/com/dcankayrak/blogapp/business/concretes/CategoryManager.java:
--------------------------------------------------------------------------------
1 | package com.dcankayrak.blogapp.business.concretes;
2 |
3 | import java.util.List;
4 |
5 | import org.springframework.beans.factory.annotation.Autowired;
6 | import org.springframework.stereotype.Service;
7 |
8 | import com.dcankayrak.blogapp.business.abstracts.CategoryService;
9 | import com.dcankayrak.blogapp.entities.Category;
10 | import com.dcankayrak.blogapp.repositories.CategoryRepository;
11 |
12 | @Service
13 | public class CategoryManager implements CategoryService{
14 |
15 | private CategoryRepository theCategoryRepository;
16 |
17 | @Autowired
18 | public CategoryManager(CategoryRepository theCategoryRepository) {
19 | this.theCategoryRepository = theCategoryRepository;
20 | }
21 |
22 | @Override
23 | public List getCategories() {
24 | return this.theCategoryRepository.findAll();
25 | }
26 |
27 | @Override
28 | public Category createCategory(Category theCategory) {
29 | return this.theCategoryRepository.save(theCategory);
30 | }
31 |
32 | @Override
33 | public Category updateCategory(int id,Category theCategory) {
34 | Category tempCategory = this.theCategoryRepository.findById(id).orElse(null);
35 | if(tempCategory != null) {
36 | tempCategory.setName(theCategory.getName());
37 | return this.theCategoryRepository.save(tempCategory);
38 | }
39 | return null;
40 | }
41 |
42 | @Override
43 | public void deleteCategory(int id) {
44 | if(this.theCategoryRepository.findById(id).isPresent()) {
45 | this.theCategoryRepository.deleteById(id);
46 | }
47 | }
48 |
49 | @Override
50 | public Category getCategory(int id) {
51 | Category foundCategory = this.theCategoryRepository.findById(id).orElse(null);
52 | if(foundCategory != null) {
53 | return foundCategory;
54 | }
55 | return null;
56 | }
57 |
58 | }
59 |
--------------------------------------------------------------------------------
/blog-app/src/main/java/com/dcankayrak/blogapp/business/concretes/CommentManager.java:
--------------------------------------------------------------------------------
1 | package com.dcankayrak.blogapp.business.concretes;
2 |
3 | import java.util.List;
4 | import java.util.Optional;
5 |
6 | import org.springframework.beans.factory.annotation.Autowired;
7 | import org.springframework.stereotype.Service;
8 |
9 | import com.dcankayrak.blogapp.business.abstracts.CommentService;
10 | import com.dcankayrak.blogapp.entities.Comment;
11 | import com.dcankayrak.blogapp.entities.Post;
12 | import com.dcankayrak.blogapp.repositories.CommentRepository;
13 | import com.dcankayrak.blogapp.repositories.PostRepository;
14 | import com.dcankayrak.blogapp.requests.CommentCreateRequest;
15 |
16 | @Service
17 | public class CommentManager implements CommentService{
18 |
19 | private CommentRepository theCommentRepository;
20 | private PostRepository thePostRepository;
21 |
22 | @Autowired
23 | public CommentManager(CommentRepository theCommentRepository,
24 | PostRepository thePostRepository) {
25 | this.theCommentRepository = theCommentRepository;
26 | this.thePostRepository = thePostRepository;
27 | }
28 |
29 | @Override
30 | public List getComments() {
31 | return this.theCommentRepository.findAll();
32 | }
33 |
34 | @Override
35 | public Comment getComment(int id) {
36 | Optional foundComment = this.theCommentRepository.findById(id);
37 | if(foundComment.isPresent()) {
38 | return foundComment.get();
39 | }
40 | return null;
41 | }
42 |
43 | @Override
44 | public Comment createComment(CommentCreateRequest createComment) {
45 | System.out.println(createComment);
46 | Optional foundPost = this.thePostRepository.findById(createComment.getPostId());
47 | if(foundPost.isPresent()) {
48 | Comment newComment = new Comment();
49 | newComment.setPost(foundPost.get());
50 | newComment.setFirstName(createComment.getFirstName());
51 | newComment.setLastName(createComment.getLastName());
52 | newComment.setEmail(createComment.getEmail());
53 | newComment.setComment(createComment.getComment());
54 | return this.theCommentRepository.save(newComment);
55 | }
56 | return null;
57 | }
58 |
59 |
60 | @Override
61 | public void deleteComment(int id) {
62 | if(this.theCommentRepository.findById(id).isPresent()) {
63 | this.theCommentRepository.deleteById(id);
64 | }
65 | }
66 |
67 | @Override
68 | public List getCommentsWithPostId(int postId) {
69 | return null;
70 | }
71 |
72 | }
73 |
--------------------------------------------------------------------------------
/blog-app/src/main/java/com/dcankayrak/blogapp/business/concretes/PostManager.java:
--------------------------------------------------------------------------------
1 | package com.dcankayrak.blogapp.business.concretes;
2 |
3 | import java.time.LocalDate;
4 | import java.util.List;
5 | import java.util.Optional;
6 |
7 | import org.springframework.beans.factory.annotation.Autowired;
8 | import org.springframework.stereotype.Service;
9 |
10 | import com.dcankayrak.blogapp.business.abstracts.PostService;
11 | import com.dcankayrak.blogapp.entities.Category;
12 | import com.dcankayrak.blogapp.entities.Post;
13 | import com.dcankayrak.blogapp.repositories.CategoryRepository;
14 | import com.dcankayrak.blogapp.repositories.PostRepository;
15 | import com.dcankayrak.blogapp.requests.PostCreateRequest;
16 | import com.dcankayrak.blogapp.requests.PostUpdateRequest;
17 |
18 | @Service
19 | public class PostManager implements PostService{
20 |
21 | private PostRepository thePostRepository;
22 | private CategoryRepository theCategoryRepository;
23 |
24 | @Autowired
25 | public PostManager(PostRepository thePostRepository,CategoryRepository theCategoryRepository) {
26 | this.thePostRepository = thePostRepository;
27 | this.theCategoryRepository = theCategoryRepository;
28 | }
29 |
30 | @Override
31 | public List getAllPosts() {
32 | return this.thePostRepository.findAll();
33 | }
34 |
35 | @Override
36 | public Post getPost(int id) {
37 | Optional thePost = this.thePostRepository.findById(id);
38 | if(thePost.isPresent()) {
39 | return thePost.get();
40 | }
41 | return null;
42 | }
43 |
44 | @Override
45 | public Post createPost(PostCreateRequest postRequest) {
46 | Post newPost = new Post();
47 | Category foundCategory = this.theCategoryRepository
48 | .findById(postRequest.getCategoryId()).orElse(null);
49 | if(foundCategory != null) {
50 | newPost.setTitle(postRequest.getTitle());
51 | newPost.setText(postRequest.getText());
52 | newPost.setCategory(foundCategory);
53 | newPost.setUploadDate(LocalDate.now());
54 | newPost.setImage(postRequest.getImage());
55 |
56 | return this.thePostRepository.save(newPost);
57 | }
58 | return null;
59 | }
60 |
61 | @Override
62 | public Post updatePost(int id,PostUpdateRequest thePost) {
63 | Optional foundPost = this.thePostRepository.findById(id);
64 | Optional foundCategory = this.theCategoryRepository.findById(thePost.getCategoryId());
65 | if(foundPost.isPresent() && foundCategory.isPresent()) {
66 | Post updatedPost = foundPost.get();
67 | updatedPost.setCategory(foundCategory.get());
68 | updatedPost.setTitle(thePost.getTitle());
69 | updatedPost.setText(thePost.getText());
70 | updatedPost.setUploadDate(LocalDate.now());
71 | updatedPost.setImage(thePost.getImage());
72 | }
73 | return null;
74 | }
75 |
76 | @Override
77 | public void deletePost(int id) {
78 | Optional thePost = this.thePostRepository.findById(id);
79 | if(thePost.isPresent()) {
80 | this.thePostRepository.deleteById(id);
81 | }
82 | }
83 |
84 | @Override
85 | public List findByCategoryId(int categoryId) {
86 | return this.thePostRepository.findByCategoryId(categoryId);
87 | }
88 |
89 | }
90 |
--------------------------------------------------------------------------------
/blog-app/src/main/java/com/dcankayrak/blogapp/business/concretes/UserManager.java:
--------------------------------------------------------------------------------
1 | package com.dcankayrak.blogapp.business.concretes;
2 |
3 | import java.util.List;
4 | import java.util.Optional;
5 |
6 | import org.springframework.beans.factory.annotation.Autowired;
7 | import org.springframework.stereotype.Service;
8 |
9 | import com.dcankayrak.blogapp.business.abstracts.UserService;
10 | import com.dcankayrak.blogapp.entities.User;
11 | import com.dcankayrak.blogapp.repositories.UserRepository;
12 | import com.dcankayrak.blogapp.requests.UserCreateRequest;
13 | import com.dcankayrak.blogapp.requests.UserUpdateRequest;
14 |
15 | @Service
16 | public class UserManager implements UserService{
17 |
18 | private UserRepository theUserRepository;
19 |
20 | @Autowired
21 | public UserManager(UserRepository theUserRepository) {
22 | this.theUserRepository = theUserRepository;
23 | }
24 |
25 | @Override
26 | public List getUsers() {
27 | return this.theUserRepository.findAll();
28 | }
29 |
30 | @Override
31 | public User getUser(int id) {
32 | Optional foundUser = this.theUserRepository.findById(id);
33 |
34 | if(foundUser.isPresent()) {
35 | return foundUser.get();
36 | }
37 | return null;
38 | }
39 |
40 | @Override
41 | public User createUser(UserCreateRequest createUser) {
42 | User newUser = new User();
43 | newUser.setName(createUser.getName());
44 | newUser.setMail(createUser.getMail());
45 | newUser.setPassword(createUser.getPassword());
46 |
47 | return this.theUserRepository.save(newUser);
48 | }
49 |
50 | @Override
51 | public User updateUser(int id, UserUpdateRequest updateUser) {
52 | Optional newUser = this.theUserRepository.findById(id);
53 |
54 | if(newUser.isPresent()) {
55 | User updatedUser = new User();
56 | updatedUser.setId(id);
57 | updatedUser.setName(updateUser.getName());
58 | updatedUser.setMail(updateUser.getMail());
59 | updatedUser.setPassword(updateUser.getPassword());
60 |
61 | return this.theUserRepository.save(updatedUser);
62 | }
63 | return null;
64 | }
65 |
66 | @Override
67 | public void deleteUser(int id) {
68 | if(this.theUserRepository.findById(id).isPresent()) {
69 | this.theUserRepository.deleteById(id);
70 | }
71 |
72 | }
73 |
74 |
75 | }
76 |
--------------------------------------------------------------------------------
/blog-app/src/main/java/com/dcankayrak/blogapp/controller/CategoryController.java:
--------------------------------------------------------------------------------
1 | package com.dcankayrak.blogapp.controller;
2 |
3 | import java.util.List;
4 |
5 | import org.springframework.beans.factory.annotation.Autowired;
6 | import org.springframework.web.bind.annotation.DeleteMapping;
7 | import org.springframework.web.bind.annotation.GetMapping;
8 | import org.springframework.web.bind.annotation.PathVariable;
9 | import org.springframework.web.bind.annotation.PostMapping;
10 | import org.springframework.web.bind.annotation.PutMapping;
11 | import org.springframework.web.bind.annotation.RequestBody;
12 | import org.springframework.web.bind.annotation.RequestMapping;
13 | import org.springframework.web.bind.annotation.RestController;
14 |
15 | import com.dcankayrak.blogapp.business.abstracts.CategoryService;
16 | import com.dcankayrak.blogapp.entities.Category;
17 |
18 | @RestController
19 | @RequestMapping("/api/categories")
20 | public class CategoryController {
21 |
22 | private CategoryService theCategoryService;
23 |
24 |
25 | @Autowired
26 | public CategoryController(CategoryService theCategoryService) {
27 | this.theCategoryService = theCategoryService;
28 | }
29 |
30 | @GetMapping("/")
31 | public List getAllPosts() {
32 | return this.theCategoryService.getCategories();
33 | }
34 |
35 | @GetMapping("/{categoryId}")
36 | public Category getPost(@PathVariable int categoryId) {
37 | return this.theCategoryService.getCategory(categoryId);
38 | }
39 |
40 | @PostMapping("/")
41 | public Category createCategory(@RequestBody Category newCategory) {
42 | return this.theCategoryService.createCategory(newCategory);
43 | }
44 |
45 | @PutMapping("/{categoryId}")
46 | public Category updateCategory(@PathVariable int postId,@RequestBody Category updateCategory) {
47 | return this.theCategoryService.updateCategory(postId, updateCategory);
48 | }
49 |
50 | @DeleteMapping("/{categoryId}")
51 | public void deletePost(@PathVariable int categoryId) {
52 | this.theCategoryService.deleteCategory(categoryId);
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/blog-app/src/main/java/com/dcankayrak/blogapp/controller/CommentController.java:
--------------------------------------------------------------------------------
1 | package com.dcankayrak.blogapp.controller;
2 |
3 | import java.util.List;
4 |
5 | import org.springframework.beans.factory.annotation.Autowired;
6 | import org.springframework.web.bind.annotation.DeleteMapping;
7 | import org.springframework.web.bind.annotation.GetMapping;
8 | import org.springframework.web.bind.annotation.PathVariable;
9 | import org.springframework.web.bind.annotation.PostMapping;
10 | import org.springframework.web.bind.annotation.RequestBody;
11 | import org.springframework.web.bind.annotation.RequestMapping;
12 | import org.springframework.web.bind.annotation.RestController;
13 |
14 | import com.dcankayrak.blogapp.business.abstracts.CommentService;
15 | import com.dcankayrak.blogapp.entities.Comment;
16 | import com.dcankayrak.blogapp.requests.CommentCreateRequest;
17 |
18 | @RestController
19 | @RequestMapping("/api/comments")
20 | public class CommentController {
21 |
22 | private CommentService theCommentService;
23 |
24 | @Autowired
25 | public CommentController(CommentService theCommentService) {
26 | this.theCommentService = theCommentService;
27 | }
28 |
29 | @GetMapping("/")
30 | public List getComments(){
31 | return this.theCommentService.getComments();
32 | }
33 |
34 | @GetMapping("/{commentId}")
35 | public Comment getComments(@PathVariable int id){
36 | return this.theCommentService.getComment(id);
37 | }
38 |
39 | @GetMapping("/post/{postId}")
40 | public List getCommentsWithPostId(@PathVariable int postId){
41 | return this.theCommentService.getCommentsWithPostId(postId);
42 | }
43 |
44 | @PostMapping("/")
45 | public Comment createComment(@RequestBody CommentCreateRequest request){
46 | return this.theCommentService.createComment(request);
47 | }
48 |
49 | @DeleteMapping("/{commentId}")
50 | public void deleteComment(@PathVariable int commentId) {
51 | this.theCommentService.deleteComment(commentId);
52 | }
53 |
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/blog-app/src/main/java/com/dcankayrak/blogapp/controller/PostController.java:
--------------------------------------------------------------------------------
1 | package com.dcankayrak.blogapp.controller;
2 |
3 | import java.util.List;
4 |
5 | import org.springframework.beans.factory.annotation.Autowired;
6 | import org.springframework.web.bind.annotation.DeleteMapping;
7 | import org.springframework.web.bind.annotation.GetMapping;
8 | import org.springframework.web.bind.annotation.PathVariable;
9 | import org.springframework.web.bind.annotation.PostMapping;
10 | import org.springframework.web.bind.annotation.PutMapping;
11 | import org.springframework.web.bind.annotation.RequestBody;
12 | import org.springframework.web.bind.annotation.RequestMapping;
13 | import org.springframework.web.bind.annotation.RestController;
14 |
15 | import com.dcankayrak.blogapp.business.abstracts.PostService;
16 | import com.dcankayrak.blogapp.entities.Post;
17 | import com.dcankayrak.blogapp.requests.PostCreateRequest;
18 | import com.dcankayrak.blogapp.requests.PostUpdateRequest;
19 |
20 | @RestController
21 | @RequestMapping("/api/posts")
22 | public class PostController {
23 |
24 | private PostService thePostService;
25 |
26 | @Autowired
27 | public PostController(PostService thePostService) {
28 | this.thePostService = thePostService;
29 | }
30 |
31 | @GetMapping("/")
32 | public List getAllPosts() {
33 | return this.thePostService.getAllPosts();
34 | }
35 |
36 | @GetMapping("/{postId}")
37 | public Post getPost(@PathVariable int postId) {
38 | return this.thePostService.getPost(postId);
39 | }
40 |
41 | @GetMapping("/category/{categoryId}")
42 | public List getPostsWithCategoryId(@PathVariable int categoryId) {
43 | return this.thePostService.findByCategoryId(categoryId);
44 | }
45 |
46 | @PostMapping("/")
47 | public Post createPost(@RequestBody PostCreateRequest newPost) {
48 | return this.thePostService.createPost(newPost);
49 | }
50 |
51 | @PutMapping("/{postId}")
52 | public Post updatePost(@PathVariable int postId,@RequestBody PostUpdateRequest updatePost) {
53 | return this.thePostService.updatePost(postId, updatePost);
54 | }
55 |
56 | @DeleteMapping("/{postId}")
57 | public void deletePost(@PathVariable int postId) {
58 | this.thePostService.deletePost(postId);
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/blog-app/src/main/java/com/dcankayrak/blogapp/entities/Category.java:
--------------------------------------------------------------------------------
1 | package com.dcankayrak.blogapp.entities;
2 |
3 | import jakarta.persistence.Column;
4 | import jakarta.persistence.Entity;
5 | import jakarta.persistence.GeneratedValue;
6 | import jakarta.persistence.GenerationType;
7 | import jakarta.persistence.Id;
8 | import jakarta.persistence.Table;
9 | import lombok.AllArgsConstructor;
10 | import lombok.Data;
11 | import lombok.NoArgsConstructor;
12 |
13 | @Entity
14 | @Data
15 | @NoArgsConstructor
16 | @AllArgsConstructor
17 | @Table(name = "category",schema="public")
18 | public class Category {
19 |
20 | @Id
21 | @GeneratedValue(strategy = GenerationType.IDENTITY)
22 | @Column(name = "category_id")
23 | private int id;
24 |
25 | @Column(name = "name")
26 | private String name;
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/blog-app/src/main/java/com/dcankayrak/blogapp/entities/Comment.java:
--------------------------------------------------------------------------------
1 | package com.dcankayrak.blogapp.entities;
2 |
3 | import com.fasterxml.jackson.annotation.JsonIgnore;
4 |
5 | import jakarta.persistence.CascadeType;
6 | import jakarta.persistence.Column;
7 | import jakarta.persistence.Entity;
8 | import jakarta.persistence.FetchType;
9 | import jakarta.persistence.GeneratedValue;
10 | import jakarta.persistence.GenerationType;
11 | import jakarta.persistence.Id;
12 | import jakarta.persistence.JoinColumn;
13 | import jakarta.persistence.ManyToOne;
14 | import jakarta.persistence.Table;
15 | import lombok.AllArgsConstructor;
16 | import lombok.Data;
17 | import lombok.NoArgsConstructor;
18 |
19 | @Entity
20 | @Data
21 | @AllArgsConstructor
22 | @NoArgsConstructor
23 | @Table(name = "comment",schema = "public")
24 | public class Comment {
25 |
26 | @Id
27 | @GeneratedValue(strategy = GenerationType.IDENTITY)
28 | @Column(name = "id")
29 | private int id;
30 |
31 | @Column(name = "first_name")
32 | private String firstName;
33 |
34 | @Column(name = "last_name")
35 | private String lastName;
36 |
37 | @Column(name = "email")
38 | private String email;
39 |
40 | // If I can't give the JsonIgnore annotation, it will throw an error. Cause fetchtype is lazy.
41 | @ManyToOne(fetch = FetchType.LAZY,cascade = {CascadeType.DETACH,CascadeType.MERGE,CascadeType.PERSIST,CascadeType.REFRESH,CascadeType.REMOVE})
42 | @JoinColumn(name = "post_id")
43 | @JsonIgnore
44 | Post post;
45 |
46 | @Column(name = "comment")
47 | private String comment;
48 |
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/blog-app/src/main/java/com/dcankayrak/blogapp/entities/Post.java:
--------------------------------------------------------------------------------
1 | package com.dcankayrak.blogapp.entities;
2 |
3 |
4 | import java.time.LocalDate;
5 | import java.util.List;
6 |
7 | import jakarta.persistence.CascadeType;
8 | import jakarta.persistence.Column;
9 | import jakarta.persistence.Entity;
10 | import jakarta.persistence.FetchType;
11 | import jakarta.persistence.GeneratedValue;
12 | import jakarta.persistence.GenerationType;
13 | import jakarta.persistence.Id;
14 | import jakarta.persistence.JoinColumn;
15 | import jakarta.persistence.ManyToOne;
16 | import jakarta.persistence.OneToMany;
17 | import jakarta.persistence.Table;
18 | import lombok.AllArgsConstructor;
19 | import lombok.Data;
20 | import lombok.NoArgsConstructor;
21 | @Entity
22 | @Data
23 | @AllArgsConstructor
24 | @NoArgsConstructor
25 | @Table(name = "Post",schema = "public")
26 | public class Post {
27 |
28 | @Id
29 | @GeneratedValue(strategy = GenerationType.IDENTITY)
30 | @Column(name = "id")
31 | private int id;
32 |
33 | @Column(name = "title")
34 | private String title;
35 |
36 | @ManyToOne()
37 | @JoinColumn(name = "category_id")
38 | private Category category;
39 |
40 | @Column(name = "text")
41 | private String text;
42 |
43 | @Column(name = "image")
44 | private String image;
45 |
46 | @Column(name = "upload_date")
47 | private LocalDate uploadDate;
48 |
49 | @OneToMany(fetch = FetchType.LAZY,mappedBy = "post",cascade = CascadeType.ALL)
50 | @Column(name = "comments")
51 | private List comments;
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/blog-app/src/main/java/com/dcankayrak/blogapp/entities/User.java:
--------------------------------------------------------------------------------
1 | package com.dcankayrak.blogapp.entities;
2 |
3 | import jakarta.persistence.Column;
4 | import jakarta.persistence.Entity;
5 | import jakarta.persistence.GeneratedValue;
6 | import jakarta.persistence.GenerationType;
7 | import jakarta.persistence.Id;
8 | import jakarta.persistence.Table;
9 | import lombok.AllArgsConstructor;
10 | import lombok.Data;
11 | import lombok.NoArgsConstructor;
12 |
13 | @Entity
14 | @Data
15 | @AllArgsConstructor
16 | @NoArgsConstructor
17 | @Table(name = "user",schema = "public")
18 | public class User {
19 |
20 | @Id
21 | @GeneratedValue(strategy = GenerationType.IDENTITY)
22 | @Column(name = "id")
23 | private int id;
24 |
25 | @Column(name = "name")
26 | private String name;
27 |
28 | @Column(name = "mail")
29 | private String mail;
30 |
31 | @Column(name = "password")
32 | private String password;
33 | }
34 |
--------------------------------------------------------------------------------
/blog-app/src/main/java/com/dcankayrak/blogapp/repositories/CategoryRepository.java:
--------------------------------------------------------------------------------
1 | package com.dcankayrak.blogapp.repositories;
2 |
3 | import org.springframework.data.jpa.repository.JpaRepository;
4 |
5 | import com.dcankayrak.blogapp.entities.Category;
6 |
7 | public interface CategoryRepository extends JpaRepository{
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/blog-app/src/main/java/com/dcankayrak/blogapp/repositories/CommentRepository.java:
--------------------------------------------------------------------------------
1 | package com.dcankayrak.blogapp.repositories;
2 |
3 | import java.util.List;
4 |
5 | import org.springframework.data.jpa.repository.JpaRepository;
6 | import org.springframework.data.jpa.repository.Query;
7 |
8 | import com.dcankayrak.blogapp.entities.Comment;
9 |
10 | public interface CommentRepository extends JpaRepository{
11 |
12 | //@Query("FROM Comment where post.id")
13 | //List findByPost(int postId);
14 | }
15 |
--------------------------------------------------------------------------------
/blog-app/src/main/java/com/dcankayrak/blogapp/repositories/PostRepository.java:
--------------------------------------------------------------------------------
1 | package com.dcankayrak.blogapp.repositories;
2 |
3 | import java.util.List;
4 |
5 | import org.springframework.data.jpa.repository.JpaRepository;
6 |
7 | import com.dcankayrak.blogapp.entities.Post;
8 |
9 | public interface PostRepository extends JpaRepository {
10 | List findByCategoryId(int categoryId);
11 | }
12 |
--------------------------------------------------------------------------------
/blog-app/src/main/java/com/dcankayrak/blogapp/repositories/UserRepository.java:
--------------------------------------------------------------------------------
1 | package com.dcankayrak.blogapp.repositories;
2 |
3 | import org.springframework.data.jpa.repository.JpaRepository;
4 |
5 | import com.dcankayrak.blogapp.entities.User;
6 |
7 | public interface UserRepository extends JpaRepository{
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/blog-app/src/main/java/com/dcankayrak/blogapp/requests/CommentCreateRequest.java:
--------------------------------------------------------------------------------
1 | package com.dcankayrak.blogapp.requests;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Data;
5 | import lombok.NoArgsConstructor;
6 |
7 | @Data
8 | @AllArgsConstructor
9 | @NoArgsConstructor
10 | public class CommentCreateRequest {
11 |
12 | private String firstName;
13 | private String lastName;
14 | private String email;
15 | private int postId;
16 | private String comment;
17 |
18 | @Override
19 | public String toString() {
20 | return "CommentCreateRequest [firstName=" + firstName + ", lastName=" + lastName + ", email=" + email
21 | + ", postId=" + postId + ", comment=" + comment + "]";
22 | }
23 |
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/blog-app/src/main/java/com/dcankayrak/blogapp/requests/PostCreateRequest.java:
--------------------------------------------------------------------------------
1 | package com.dcankayrak.blogapp.requests;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Data;
5 | import lombok.NoArgsConstructor;
6 |
7 | @Data
8 | @AllArgsConstructor
9 | @NoArgsConstructor
10 | public class PostCreateRequest {
11 |
12 | private String title;
13 | private int categoryId;
14 | private String text;
15 | private String image;
16 | }
17 |
--------------------------------------------------------------------------------
/blog-app/src/main/java/com/dcankayrak/blogapp/requests/PostUpdateRequest.java:
--------------------------------------------------------------------------------
1 | package com.dcankayrak.blogapp.requests;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Data;
5 | import lombok.NoArgsConstructor;
6 |
7 | @Data
8 | @AllArgsConstructor
9 | @NoArgsConstructor
10 | public class PostUpdateRequest {
11 |
12 | private String title;
13 | private int categoryId;
14 | private String text;
15 | private String image;
16 | }
17 |
--------------------------------------------------------------------------------
/blog-app/src/main/java/com/dcankayrak/blogapp/requests/UserCreateRequest.java:
--------------------------------------------------------------------------------
1 | package com.dcankayrak.blogapp.requests;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Data;
5 | import lombok.NoArgsConstructor;
6 |
7 | @Data
8 | @AllArgsConstructor
9 | @NoArgsConstructor
10 | public class UserCreateRequest {
11 |
12 | private String name;
13 | private String mail;
14 | private String password;
15 | }
16 |
--------------------------------------------------------------------------------
/blog-app/src/main/java/com/dcankayrak/blogapp/requests/UserUpdateRequest.java:
--------------------------------------------------------------------------------
1 | package com.dcankayrak.blogapp.requests;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Data;
5 | import lombok.NoArgsConstructor;
6 |
7 | @Data
8 | @AllArgsConstructor
9 | @NoArgsConstructor
10 | public class UserUpdateRequest {
11 |
12 | private String name;
13 | private String mail;
14 | private String password;
15 | }
16 |
--------------------------------------------------------------------------------
/blog-app/src/main/java/com/dcankayrak/blogapp/responses/PostResponse.java:
--------------------------------------------------------------------------------
1 | package com.dcankayrak.blogapp.responses;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Data;
5 | import lombok.NoArgsConstructor;
6 |
7 | @Data
8 | @AllArgsConstructor
9 | @NoArgsConstructor
10 | public class PostResponse {
11 |
12 | private int id;
13 | private int categoryId;
14 | private String title;
15 | private String text;
16 | }
17 |
--------------------------------------------------------------------------------
/blog-app/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect
2 | spring.jpa.hibernate.ddl-auto=update
3 | spring.jpa.hibernate.show-sql=true
4 | spring.datasource.url=jdbc:postgresql://localhost:5432/blog-app
5 | spring.datasource.username=********
6 | spring.datasource.password=*****
7 | spring.jpa.properties.javax.persistence.validation.mode = none
8 |
9 | questapp.app.secret=blogApp
10 | questapp.expires.in=604800
11 |
--------------------------------------------------------------------------------
/blog-app/src/test/java/com/dcankayrak/blogapp/BlogAppApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.dcankayrak.blogapp;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class BlogAppApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/blog-app/target/classes/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Build-Jdk-Spec: 18
3 | Implementation-Title: blog-app
4 | Implementation-Version: 0.0.1-SNAPSHOT
5 | Created-By: Maven Integration for Eclipse
6 |
7 |
--------------------------------------------------------------------------------
/blog-app/target/classes/META-INF/maven/com.dcankayrak/blog-app/pom.properties:
--------------------------------------------------------------------------------
1 | #Generated by Maven Integration for Eclipse
2 | #Mon Apr 24 18:21:36 TRT 2023
3 | artifactId=blog-app
4 | groupId=com.dcankayrak
5 | m2e.projectLocation=C\:\\Users\\danya\\OneDrive\\Masa\u00FCst\u00FC\\\u00C7al\u0131\u015Fmalar\u0131m\\blog-app
6 | m2e.projectName=blog-app
7 | version=0.0.1-SNAPSHOT
8 |
--------------------------------------------------------------------------------
/blog-app/target/classes/META-INF/maven/com.dcankayrak/blog-app/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 |
6 | org.springframework.boot
7 | spring-boot-starter-parent
8 | 3.0.5
9 |
10 |
11 | com.dcankayrak
12 | blog-app
13 | 0.0.1-SNAPSHOT
14 | blog-app
15 | Demo project for Spring Boot
16 |
17 | 17
18 |
19 |
20 |
21 | org.springframework.boot
22 | spring-boot-starter-data-jpa
23 |
24 |
25 | org.springframework.boot
26 | spring-boot-starter-web
27 |
28 |
29 |
30 | org.postgresql
31 | postgresql
32 | runtime
33 |
34 |
35 | org.projectlombok
36 | lombok
37 | true
38 |
39 |
40 | org.springframework.boot
41 | spring-boot-starter-test
42 | test
43 |
44 |
45 |
46 |
47 |
48 |
49 | org.springframework.boot
50 | spring-boot-maven-plugin
51 |
52 |
53 |
54 | org.projectlombok
55 | lombok
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/blog-app/target/classes/application.properties:
--------------------------------------------------------------------------------
1 | spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect
2 | spring.jpa.hibernate.ddl-auto=update
3 | spring.jpa.hibernate.show-sql=true
4 | spring.datasource.url=jdbc:postgresql://localhost:5432/blog-app
5 | spring.datasource.username=********
6 | spring.datasource.password=*****
7 | spring.jpa.properties.javax.persistence.validation.mode = none
8 |
9 | questapp.app.secret=blogApp
10 | questapp.expires.in=604800
11 |
--------------------------------------------------------------------------------
/blog-app/target/classes/com/dcankayrak/blogapp/BlogAppApplication.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dcankayrak/Blog-App-Backend/3edf29716996bbe36f76932fd2a7d5bf2d57de29/blog-app/target/classes/com/dcankayrak/blogapp/BlogAppApplication.class
--------------------------------------------------------------------------------
/blog-app/target/classes/com/dcankayrak/blogapp/business/abstracts/CategoryService.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dcankayrak/Blog-App-Backend/3edf29716996bbe36f76932fd2a7d5bf2d57de29/blog-app/target/classes/com/dcankayrak/blogapp/business/abstracts/CategoryService.class
--------------------------------------------------------------------------------
/blog-app/target/classes/com/dcankayrak/blogapp/business/abstracts/CommentService.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dcankayrak/Blog-App-Backend/3edf29716996bbe36f76932fd2a7d5bf2d57de29/blog-app/target/classes/com/dcankayrak/blogapp/business/abstracts/CommentService.class
--------------------------------------------------------------------------------
/blog-app/target/classes/com/dcankayrak/blogapp/business/abstracts/PostService.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dcankayrak/Blog-App-Backend/3edf29716996bbe36f76932fd2a7d5bf2d57de29/blog-app/target/classes/com/dcankayrak/blogapp/business/abstracts/PostService.class
--------------------------------------------------------------------------------
/blog-app/target/classes/com/dcankayrak/blogapp/business/abstracts/UserService.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dcankayrak/Blog-App-Backend/3edf29716996bbe36f76932fd2a7d5bf2d57de29/blog-app/target/classes/com/dcankayrak/blogapp/business/abstracts/UserService.class
--------------------------------------------------------------------------------
/blog-app/target/classes/com/dcankayrak/blogapp/business/concretes/CategoryManager.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dcankayrak/Blog-App-Backend/3edf29716996bbe36f76932fd2a7d5bf2d57de29/blog-app/target/classes/com/dcankayrak/blogapp/business/concretes/CategoryManager.class
--------------------------------------------------------------------------------
/blog-app/target/classes/com/dcankayrak/blogapp/business/concretes/CommentManager.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dcankayrak/Blog-App-Backend/3edf29716996bbe36f76932fd2a7d5bf2d57de29/blog-app/target/classes/com/dcankayrak/blogapp/business/concretes/CommentManager.class
--------------------------------------------------------------------------------
/blog-app/target/classes/com/dcankayrak/blogapp/business/concretes/PostManager.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dcankayrak/Blog-App-Backend/3edf29716996bbe36f76932fd2a7d5bf2d57de29/blog-app/target/classes/com/dcankayrak/blogapp/business/concretes/PostManager.class
--------------------------------------------------------------------------------
/blog-app/target/classes/com/dcankayrak/blogapp/business/concretes/UserManager.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dcankayrak/Blog-App-Backend/3edf29716996bbe36f76932fd2a7d5bf2d57de29/blog-app/target/classes/com/dcankayrak/blogapp/business/concretes/UserManager.class
--------------------------------------------------------------------------------
/blog-app/target/classes/com/dcankayrak/blogapp/controller/CategoryController.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dcankayrak/Blog-App-Backend/3edf29716996bbe36f76932fd2a7d5bf2d57de29/blog-app/target/classes/com/dcankayrak/blogapp/controller/CategoryController.class
--------------------------------------------------------------------------------
/blog-app/target/classes/com/dcankayrak/blogapp/controller/CommentController.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dcankayrak/Blog-App-Backend/3edf29716996bbe36f76932fd2a7d5bf2d57de29/blog-app/target/classes/com/dcankayrak/blogapp/controller/CommentController.class
--------------------------------------------------------------------------------
/blog-app/target/classes/com/dcankayrak/blogapp/controller/PostController.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dcankayrak/Blog-App-Backend/3edf29716996bbe36f76932fd2a7d5bf2d57de29/blog-app/target/classes/com/dcankayrak/blogapp/controller/PostController.class
--------------------------------------------------------------------------------
/blog-app/target/classes/com/dcankayrak/blogapp/entities/Category.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dcankayrak/Blog-App-Backend/3edf29716996bbe36f76932fd2a7d5bf2d57de29/blog-app/target/classes/com/dcankayrak/blogapp/entities/Category.class
--------------------------------------------------------------------------------
/blog-app/target/classes/com/dcankayrak/blogapp/entities/Comment.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dcankayrak/Blog-App-Backend/3edf29716996bbe36f76932fd2a7d5bf2d57de29/blog-app/target/classes/com/dcankayrak/blogapp/entities/Comment.class
--------------------------------------------------------------------------------
/blog-app/target/classes/com/dcankayrak/blogapp/entities/Post.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dcankayrak/Blog-App-Backend/3edf29716996bbe36f76932fd2a7d5bf2d57de29/blog-app/target/classes/com/dcankayrak/blogapp/entities/Post.class
--------------------------------------------------------------------------------
/blog-app/target/classes/com/dcankayrak/blogapp/entities/User.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dcankayrak/Blog-App-Backend/3edf29716996bbe36f76932fd2a7d5bf2d57de29/blog-app/target/classes/com/dcankayrak/blogapp/entities/User.class
--------------------------------------------------------------------------------
/blog-app/target/classes/com/dcankayrak/blogapp/repositories/CategoryRepository.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dcankayrak/Blog-App-Backend/3edf29716996bbe36f76932fd2a7d5bf2d57de29/blog-app/target/classes/com/dcankayrak/blogapp/repositories/CategoryRepository.class
--------------------------------------------------------------------------------
/blog-app/target/classes/com/dcankayrak/blogapp/repositories/CommentRepository.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dcankayrak/Blog-App-Backend/3edf29716996bbe36f76932fd2a7d5bf2d57de29/blog-app/target/classes/com/dcankayrak/blogapp/repositories/CommentRepository.class
--------------------------------------------------------------------------------
/blog-app/target/classes/com/dcankayrak/blogapp/repositories/PostRepository.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dcankayrak/Blog-App-Backend/3edf29716996bbe36f76932fd2a7d5bf2d57de29/blog-app/target/classes/com/dcankayrak/blogapp/repositories/PostRepository.class
--------------------------------------------------------------------------------
/blog-app/target/classes/com/dcankayrak/blogapp/repositories/UserRepository.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dcankayrak/Blog-App-Backend/3edf29716996bbe36f76932fd2a7d5bf2d57de29/blog-app/target/classes/com/dcankayrak/blogapp/repositories/UserRepository.class
--------------------------------------------------------------------------------
/blog-app/target/classes/com/dcankayrak/blogapp/requests/CommentCreateRequest.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dcankayrak/Blog-App-Backend/3edf29716996bbe36f76932fd2a7d5bf2d57de29/blog-app/target/classes/com/dcankayrak/blogapp/requests/CommentCreateRequest.class
--------------------------------------------------------------------------------
/blog-app/target/classes/com/dcankayrak/blogapp/requests/PostCreateRequest.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dcankayrak/Blog-App-Backend/3edf29716996bbe36f76932fd2a7d5bf2d57de29/blog-app/target/classes/com/dcankayrak/blogapp/requests/PostCreateRequest.class
--------------------------------------------------------------------------------
/blog-app/target/classes/com/dcankayrak/blogapp/requests/PostUpdateRequest.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dcankayrak/Blog-App-Backend/3edf29716996bbe36f76932fd2a7d5bf2d57de29/blog-app/target/classes/com/dcankayrak/blogapp/requests/PostUpdateRequest.class
--------------------------------------------------------------------------------
/blog-app/target/classes/com/dcankayrak/blogapp/requests/UserCreateRequest.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dcankayrak/Blog-App-Backend/3edf29716996bbe36f76932fd2a7d5bf2d57de29/blog-app/target/classes/com/dcankayrak/blogapp/requests/UserCreateRequest.class
--------------------------------------------------------------------------------
/blog-app/target/classes/com/dcankayrak/blogapp/requests/UserUpdateRequest.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dcankayrak/Blog-App-Backend/3edf29716996bbe36f76932fd2a7d5bf2d57de29/blog-app/target/classes/com/dcankayrak/blogapp/requests/UserUpdateRequest.class
--------------------------------------------------------------------------------
/blog-app/target/classes/com/dcankayrak/blogapp/responses/PostResponse.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dcankayrak/Blog-App-Backend/3edf29716996bbe36f76932fd2a7d5bf2d57de29/blog-app/target/classes/com/dcankayrak/blogapp/responses/PostResponse.class
--------------------------------------------------------------------------------
/blog-app/target/test-classes/com/dcankayrak/blogapp/BlogAppApplicationTests.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dcankayrak/Blog-App-Backend/3edf29716996bbe36f76932fd2a7d5bf2d57de29/blog-app/target/test-classes/com/dcankayrak/blogapp/BlogAppApplicationTests.class
--------------------------------------------------------------------------------