Skip to content

Commit 514f8ae

Browse files
Initial commit for Basic Spring Boot Project
1 parent 465bdaf commit 514f8ae

16 files changed

Lines changed: 826 additions & 1 deletion

.gitignore

Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
# #########################
2+
# MAC OS .gitignore
3+
# #########################
4+
# General
5+
.DS_Store
6+
.AppleDouble
7+
.LSOverride
8+
9+
# Icon must end with two \r
10+
Icon
11+
12+
13+
# Thumbnails
14+
._*
15+
16+
# Files that might appear in the root of a volume
17+
.DocumentRevisions-V100
18+
.fseventsd
19+
.Spotlight-V100
20+
.TemporaryItems
21+
.Trashes
22+
.VolumeIcon.icns
23+
.com.apple.timemachine.donotpresent
24+
25+
# Directories potentially created on remote AFP share
26+
.AppleDB
27+
.AppleDesktop
28+
Network Trash Folder
29+
Temporary Items
30+
.apdisk
31+
32+
33+
# ################################
34+
# JAVA .gitignore
35+
##################################
36+
# Compiled class file
37+
*.class
38+
39+
# Log file
40+
*.log
41+
42+
# BlueJ files
43+
*.ctxt
44+
45+
# Mobile Tools for Java (J2ME)
46+
.mtj.tmp/
47+
48+
# Package Files #
49+
*.jar
50+
*.war
51+
*.nar
52+
*.ear
53+
*.zip
54+
*.tar.gz
55+
*.rar
56+
57+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
58+
hs_err_pid*
59+
60+
61+
62+
# ################################
63+
# GRADLE .gitignore
64+
# ################################
65+
.gradle
66+
/build/
67+
68+
# Ignore Gradle GUI config
69+
gradle-app.setting
70+
71+
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
72+
!gradle-wrapper.jar
73+
74+
# Cache of project
75+
.gradletasknamecache
76+
77+
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
78+
# gradle/wrapper/gradle-wrapper.properties
79+
80+
81+
# ###############################
82+
# JETBrains .gitignore
83+
# ###############################
84+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
85+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
86+
87+
# User-specific stuff
88+
.idea/**/workspace.xml
89+
.idea/**/tasks.xml
90+
.idea/**/usage.statistics.xml
91+
.idea/**/dictionaries
92+
.idea/**/shelf
93+
94+
# Generated files
95+
.idea/**/contentModel.xml
96+
97+
# Sensitive or high-churn files
98+
.idea/**/dataSources/
99+
.idea/**/dataSources.ids
100+
.idea/**/dataSources.local.xml
101+
.idea/**/sqlDataSources.xml
102+
.idea/**/dynamic.xml
103+
.idea/**/uiDesigner.xml
104+
.idea/**/dbnavigator.xml
105+
106+
# Gradle
107+
.idea/**/gradle.xml
108+
.idea/**/libraries
109+
110+
# Gradle and Maven with auto-import
111+
# When using Gradle or Maven with auto-import, you should exclude module files,
112+
# since they will be recreated, and may cause churn. Uncomment if using
113+
# auto-import.
114+
# .idea/modules.xml
115+
# .idea/*.iml
116+
# .idea/modules
117+
118+
# CMake
119+
cmake-build-*/
120+
121+
# Mongo Explorer plugin
122+
.idea/**/mongoSettings.xml
123+
124+
# File-based project format
125+
*.iws
126+
127+
# IntelliJ
128+
out/
129+
130+
# mpeltonen/sbt-idea plugin
131+
.idea_modules/
132+
133+
# JIRA plugin
134+
atlassian-ide-plugin.xml
135+
136+
# Cursive Clojure plugin
137+
.idea/replstate.xml
138+
139+
# Crashlytics plugin (for Android Studio and IntelliJ)
140+
com_crashlytics_export_strings.xml
141+
crashlytics.properties
142+
crashlytics-build.properties
143+
fabric.properties
144+
145+
# Editor-based Rest Client
146+
.idea/httpRequests
147+
148+
# Android studio 3.1+ serialized cache file
149+
.idea/caches/build_file_checksums.ser
150+
151+
152+
# #############################
153+
# Spring Boot .gitignore
154+
# #############################
155+
*#
156+
*.iml
157+
*.ipr
158+
*.iws
159+
*.jar
160+
*.sw?
161+
*~
162+
.#*
163+
.*.md.html
164+
.DS_Store
165+
.classpath
166+
.factorypath
167+
.gradle
168+
.idea
169+
.metadata
170+
.project
171+
.recommenders
172+
.settings
173+
.springBeans
174+
/build
175+
/code
176+
MANIFEST.MF
177+
_site/
178+
activemq-data
179+
bin
180+
build
181+
build.log
182+
dependency-reduced-pom.xml
183+
dump.rdb
184+
interpolated*.xml
185+
lib/
186+
manifest.yml
187+
overridedb.*
188+
settings.xml
189+
target
190+
transaction-logs
191+
.flattened-pom.xml
192+
secrets.yml
193+
.gradletasknamecache
194+
.sts4-cache

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
# spring-boot-app
1+
Sample Spring Boot project
2+
3+
This sample code is for the following article - http://developerpod.com/2018/04/20/how-to-spring-boot-project/
4+
5+
It is a very simple Spring boot project that connects to MySQL database, uses Spring Data JPA, and also build and expose REST APIS.
6+

build.gradle

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
plugins {
2+
id 'org.springframework.boot' version '2.2.3.RELEASE'
3+
id 'io.spring.dependency-management' version '1.0.8.RELEASE'
4+
id 'java'
5+
id 'idea'
6+
id 'eclipse'
7+
}
8+
9+
group = 'com.dev'
10+
version = '0.0.1-SNAPSHOT'
11+
sourceCompatibility = '11'
12+
13+
repositories {
14+
mavenCentral()
15+
}
16+
17+
18+
dependencies {
19+
// compile('org.springframework.boot:spring-boot-starter-aop')
20+
compile('org.springframework.boot:spring-boot-starter-data-jpa')
21+
// compile('org.springframework.boot:spring-boot-starter-data-redis')
22+
// compile('org.springframework.boot:spring-boot-starter-cache')
23+
// compile('org.springframework.boot:spring-boot-starter-security')
24+
compile('org.springframework.boot:spring-boot-starter-web')
25+
compile("org.springframework.boot:spring-boot-starter-actuator")
26+
27+
runtime('mysql:mysql-connector-java:5.1.48')
28+
compile ('javax.xml.bind:jaxb-api:2.3.0')
29+
compileOnly 'org.projectlombok:lombok:1.18.10'
30+
annotationProcessor 'org.projectlombok:lombok:1.18.10'
31+
32+
testCompile('org.springframework.boot:spring-boot-starter-test') {
33+
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
34+
}
35+
}
36+
37+
test {
38+
useJUnitPlatform()
39+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)