Skip to content

Commit 04c4ff2

Browse files
committed
Sample project's initial structure.
Signed-off-by: Constantinos Giannacoulis <[email protected]>
1 parent 8edb30b commit 04c4ff2

File tree

14 files changed

+1858
-1
lines changed

14 files changed

+1858
-1
lines changed

.editorconfig

+1,230
Large diffs are not rendered by default.

.gitignore

+98
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# Add any directories, files, or patterns you don't want to be tracked by version control
2+
3+
# Compiled source #
4+
###################
5+
*.com
6+
*.class
7+
*.dll
8+
*.exe
9+
*.o
10+
*.so
11+
12+
# Packages #
13+
############
14+
# it's better to unpack these files and commit the raw source
15+
# git has its own built in compression methods
16+
*.7z
17+
*.dmg
18+
*.gz
19+
*.iso
20+
*.jar
21+
*.war
22+
*.ear
23+
*.sar
24+
*.rar
25+
*.tar
26+
*.zip
27+
28+
# Logs and databases #
29+
######################
30+
*.log
31+
32+
# OS generated files #
33+
######################
34+
.DS_Store*
35+
ehthumbs.db
36+
Icon?
37+
Thumbs.db
38+
39+
# Maven #
40+
#########
41+
target
42+
pom.xml.versionsBackup
43+
dependency-reduced-pom.xml
44+
**/target/
45+
46+
# Eclipse #
47+
# based on https://github.com/github/gitignore/blob/master/Global/Eclipse.gitignore #
48+
###########
49+
.settings
50+
.project
51+
.classpath
52+
.springWebflow
53+
.metadata
54+
.springBeans
55+
**/.externalToolBuilders/
56+
*Servers/
57+
58+
# JetBrains #
59+
# based on https://github.com/github/gitignore/blob/master/Global/JetBrains.gitignore #
60+
#######################################################################################
61+
*.iml
62+
.idea/**
63+
*.ipr
64+
*.iws
65+
**/out/
66+
.idea_modules/
67+
atlassian-ide-plugin.xml
68+
com_crashlytics_export_strings.xml
69+
crashlytics.properties
70+
crashlytics-build.properties
71+
fabric.properties
72+
73+
# Node/NPM/Yarn #
74+
#################
75+
node
76+
**/node/
77+
**/node_modules/
78+
79+
# Bower #
80+
############
81+
**/bower/
82+
83+
# Webpack #
84+
############
85+
**/dist/
86+
**/www/
87+
88+
# Other #
89+
#########
90+
*.*~
91+
*.orig
92+
.gitconfig
93+
docker
94+
95+
**/logs/
96+
97+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
98+
hs_err_pid*

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
# java-path-spring-we-lead-showcase
1+
## Code.Learn - Java Learning & Development Path, Spring
2+
3+
This project hosts all source code exhibited during lab sessions related to **Spring** module.
4+
``

java-path-spring-app/pom.xml

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns="http://maven.apache.org/POM/4.0.0"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
<parent>
7+
<groupId>gr.codelearn</groupId>
8+
<artifactId>java-path-spring</artifactId>
9+
<version>2023.1.0</version>
10+
</parent>
11+
<artifactId>java-path-spring-app</artifactId>
12+
13+
<!-- Meta-data -->
14+
<name>[${project.artifactId}]</name>
15+
<description>Java Learning @ Development Path, Spring Path Application module</description>
16+
17+
<!-- Properties -->
18+
<properties>
19+
<mapstruct.version>1.5.5.Final</mapstruct.version>
20+
<jaxb-api.version>2.3.1</jaxb-api.version>
21+
<lombok.mapstruct.binding.version>0.2.0</lombok.mapstruct.binding.version>
22+
<ehcache.version>3.10.8</ehcache.version>
23+
</properties>
24+
25+
<!-- Dependencies -->
26+
<dependencies>
27+
<dependency>
28+
<groupId>org.mapstruct</groupId>
29+
<artifactId>mapstruct</artifactId>
30+
<version>${mapstruct.version}</version>
31+
</dependency>
32+
</dependencies>
33+
34+
<build>
35+
<plugins>
36+
<plugin>
37+
<groupId>org.springframework.boot</groupId>
38+
<artifactId>spring-boot-maven-plugin</artifactId>
39+
<configuration>
40+
<excludes>
41+
<exclude>
42+
<groupId>org.projectlombok</groupId>
43+
<artifactId>lombok</artifactId>
44+
</exclude>
45+
<exclude>
46+
<groupId>org.mapstruct</groupId>
47+
<artifactId>mapstruct</artifactId>
48+
</exclude>
49+
</excludes>
50+
</configuration>
51+
</plugin>
52+
<plugin>
53+
<groupId>org.graalvm.buildtools</groupId>
54+
<artifactId>native-maven-plugin</artifactId>
55+
</plugin>
56+
<plugin>
57+
<groupId>org.apache.maven.plugins</groupId>
58+
<artifactId>maven-compiler-plugin</artifactId>
59+
<version>3.11.0</version>
60+
<configuration>
61+
<!--
62+
In order to compile your project for Java 11, add the release configuration to the compiler
63+
plugin, a new compiler parameter to replace the source and target version parameters
64+
-->
65+
<release>${java.version}</release>
66+
<forceJavacCompilerUse>true</forceJavacCompilerUse>
67+
<optimize>true</optimize>
68+
<fork>true</fork>
69+
<annotationProcessorPaths>
70+
<path>
71+
<groupId>org.projectlombok</groupId>
72+
<artifactId>lombok</artifactId>
73+
<version>${lombok.version}</version>
74+
</path>
75+
<path>
76+
<groupId>org.mapstruct</groupId>
77+
<artifactId>mapstruct-processor</artifactId>
78+
<version>${mapstruct.version}</version>
79+
</path>
80+
<path>
81+
<groupId>org.projectlombok</groupId>
82+
<artifactId>lombok-mapstruct-binding</artifactId>
83+
<version>${lombok.mapstruct.binding.version}</version>
84+
</path>
85+
</annotationProcessorPaths>
86+
</configuration>
87+
</plugin>
88+
</plugins>
89+
</build>
90+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package gr.codelearn.spring.showcase.app;
2+
3+
import org.springframework.boot.SpringApplication;
4+
import org.springframework.boot.autoconfigure.SpringBootApplication;
5+
6+
@SpringBootApplication
7+
public class EshopApplication {
8+
public static void main(String[] args) {
9+
SpringApplication.run(EshopApplication.class, args);
10+
}
11+
}

java-path-spring-app/src/main/resources/application.yml

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
_____ _ _ _ _ ___ ______ _ _ _____ _
2+
/ __ \ | | | | | | | | |_ | | ___ \ | | | | / ___| (_)
3+
| / \/ ___ __| | ___ | |_| |_ _| |__ ______ | | __ ___ ____ _ | |_/ /_ _| |_| |__ ______ \ `--. _ __ _ __ _ _ __ __ _
4+
| | / _ \ / _` |/ _ \ | _ | | | | '_ \ |______| | |/ _` \ \ / / _` | | __/ _` | __| '_ \ |______| `--. \ '_ \| '__| | '_ \ / _` |
5+
| \__/\ (_) | (_| | __/_| | | | |_| | |_) | /\__/ / (_| |\ V / (_| | | | | (_| | |_| | | | /\__/ / |_) | | | | | | | (_| |
6+
\____/\___/ \__,_|\___(_)_| |_/\__,_|_.__/ \____/ \__,_| \_/ \__,_| \_| \__,_|\__|_| |_| \____/| .__/|_| |_|_| |_|\__, |
7+
| | __/ |
8+
|_| |___/
9+
${AnsiColor.GREEN}runs on Spring Boot v.${spring-boot.version}.${Ansi.DEFAULT}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Configuration status="WARN" monitorInterval="30">
3+
<Properties>
4+
<Property name="LOG_PATTERN">
5+
%d{yyyy-MM-dd HH:mm:ss.SSS} %5p ${hostName} - [%15.15t] [%-35.35c{1.}] : %m%n%ex
6+
</Property>
7+
</Properties>
8+
9+
<Appenders>
10+
<Console name="ConsoleAppender" target="SYSTEM_OUT" follow="true">
11+
<PatternLayout pattern="${LOG_PATTERN}"/>
12+
</Console>
13+
14+
<!-- Rolling Random Access File Appender with a default buffer of 256 * 1024 bytes -->
15+
<RollingRandomAccessFile name="DefaultAppender"
16+
fileName="logs/java-path-spring-default.log"
17+
filePattern="logs/java-path-spring-default-%d{yyyy-MM-dd}.zip">
18+
<PatternLayout>
19+
<Pattern>${LOG_PATTERN}</Pattern>
20+
</PatternLayout>
21+
<Policies>
22+
<TimeBasedTriggeringPolicy/>
23+
</Policies>
24+
<DefaultRolloverStrategy>
25+
<Delete basePath="logs">
26+
<IfLastModified age="30d"/>
27+
</Delete>
28+
</DefaultRolloverStrategy>
29+
</RollingRandomAccessFile>
30+
31+
<!-- Rolling Random Access File Appender with a default buffer of 256 * 1024 bytes -->
32+
<RollingRandomAccessFile name="DataAppender"
33+
fileName="logs/java-path-spring-data.log"
34+
filePattern="logs/java-path-spring-data-%d{yyyy-MM-dd}.zip">
35+
<PatternLayout>
36+
<Pattern>${LOG_PATTERN}</Pattern>
37+
</PatternLayout>
38+
<Policies>
39+
<TimeBasedTriggeringPolicy/>
40+
</Policies>
41+
<DefaultRolloverStrategy>
42+
<Delete basePath="logs">
43+
<IfLastModified age="30d"/>
44+
</Delete>
45+
</DefaultRolloverStrategy>
46+
</RollingRandomAccessFile>
47+
48+
<!-- Rolling Random Access File Appender with a default buffer of 256 * 1024 bytes -->
49+
<RollingRandomAccessFile name="SqlAppender"
50+
fileName="logs/java-path-spring-data-sql.log"
51+
filePattern="logs/java-path-spring-data-sql-%d{yyyy-MM-dd}.zip">
52+
<PatternLayout>
53+
<Pattern>${LOG_PATTERN}</Pattern>
54+
</PatternLayout>
55+
<Policies>
56+
<TimeBasedTriggeringPolicy/>
57+
</Policies>
58+
<DefaultRolloverStrategy>
59+
<Delete basePath="logs">
60+
<IfLastModified age="30d"/>
61+
</Delete>
62+
</DefaultRolloverStrategy>
63+
</RollingRandomAccessFile>
64+
</Appenders>
65+
66+
<Loggers>
67+
<AsyncLogger name="gr.codelearn.spring" level="trace" additivity="false">
68+
<AppenderRef ref="ConsoleAppender"/>
69+
<AppenderRef ref="DefaultAppender"/>
70+
</AsyncLogger>
71+
<AsyncLogger name="org.springframework.web" level="debug" additivity="false">
72+
<AppenderRef ref="ConsoleAppender"/>
73+
<AppenderRef ref="DefaultAppender"/>
74+
</AsyncLogger>
75+
<AsyncLogger name="org.springframework.cache" level="trace" additivity="false">
76+
<AppenderRef ref="ConsoleAppender"/>
77+
<AppenderRef ref="DefaultAppender"/>
78+
</AsyncLogger>
79+
<AsyncLogger name="org.springframework" level="info" additivity="false">
80+
<AppenderRef ref="ConsoleAppender"/>
81+
<AppenderRef ref="DefaultAppender"/>
82+
</AsyncLogger>
83+
<AsyncLogger name="org.springframework.transaction" level="debug" additivity="false">
84+
<AppenderRef ref="ConsoleAppender"/>
85+
<AppenderRef ref="DefaultAppender"/>
86+
</AsyncLogger>
87+
<AsyncLogger name="org.springframework.data" level="info" additivity="false">
88+
<AppenderRef ref="ConsoleAppender"/>
89+
<AppenderRef ref="DataAppender"/>
90+
</AsyncLogger>
91+
<AsyncLogger name="com.zaxxer.hikari" level="debug" additivity="false">
92+
<AppenderRef ref="ConsoleAppender"/>
93+
<AppenderRef ref="DataAppender"/>
94+
</AsyncLogger>
95+
<AsyncLogger name="org.hibernate.engine" level="warn" additivity="false">
96+
<AppenderRef ref="ConsoleAppender"/>
97+
<AppenderRef ref="DataAppender"/>
98+
</AsyncLogger>
99+
<AsyncLogger name="org.hibernate.stat" level="info" additivity="false">
100+
<AppenderRef ref="ConsoleAppender"/>
101+
<AppenderRef ref="DataAppender"/>
102+
</AsyncLogger>
103+
<AsyncLogger name="org.hibernate.SQL" level="trace" additivity="false">
104+
<AppenderRef ref="ConsoleAppender"/>
105+
<AppenderRef ref="SqlAppender"/>
106+
</AsyncLogger>
107+
<AsyncLogger name="org.hibernate.orm.jdbc.bind" level="trace" additivity="false">
108+
<AppenderRef ref="ConsoleAppender"/>
109+
<AppenderRef ref="SqlAppender"/>
110+
</AsyncLogger>
111+
<AsyncLogger name="org.hibernate.SQL_SLOW" level="trace" additivity="false">
112+
<AppenderRef ref="ConsoleAppender"/>
113+
<AppenderRef ref="DataAppender"/>
114+
<AppenderRef ref="SqlAppender"/>
115+
</AsyncLogger>
116+
<AsyncLogger name="org.hibernate.cache" level="trace" additivity="false">
117+
<AppenderRef ref="ConsoleAppender"/>
118+
<AppenderRef ref="DataAppender"/>
119+
</AsyncLogger>
120+
121+
<Root level="info">
122+
<AppenderRef ref="ConsoleAppender"/>
123+
<AppenderRef ref="DefaultAppender"/>
124+
</Root>
125+
</Loggers>
126+
</Configuration>

java-path-spring-core/pom.xml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns="http://maven.apache.org/POM/4.0.0"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
<parent>
7+
<groupId>gr.codelearn</groupId>
8+
<artifactId>java-path-spring</artifactId>
9+
<version>2023.1.0</version>
10+
</parent>
11+
<artifactId>java-path-spring-core</artifactId>
12+
13+
<!-- Meta-data -->
14+
<name>[${project.artifactId}]</name>
15+
<description>Java Learning @ Development Path, Spring Path Core module</description>
16+
17+
<!-- Dependencies -->
18+
<dependencies>
19+
</dependencies>
20+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package gr.codelearn.spring.showcase.core;
2+
3+
import org.springframework.boot.SpringApplication;
4+
import org.springframework.boot.autoconfigure.SpringBootApplication;
5+
6+
@SpringBootApplication
7+
public class SpringCoreApplication {
8+
public static void main(String[] args) {
9+
SpringApplication.run(SpringCoreApplication.class, args);
10+
}
11+
}

java-path-spring-core/src/main/resources/application.yml

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
_____ _ _ _ _ ___ ______ _ _ _____ _
2+
/ __ \ | | | | | | | | |_ | | ___ \ | | | | / ___| (_)
3+
| / \/ ___ __| | ___ | |_| |_ _| |__ ______ | | __ ___ ____ _ | |_/ /_ _| |_| |__ ______ \ `--. _ __ _ __ _ _ __ __ _
4+
| | / _ \ / _` |/ _ \ | _ | | | | '_ \ |______| | |/ _` \ \ / / _` | | __/ _` | __| '_ \ |______| `--. \ '_ \| '__| | '_ \ / _` |
5+
| \__/\ (_) | (_| | __/_| | | | |_| | |_) | /\__/ / (_| |\ V / (_| | | | | (_| | |_| | | | /\__/ / |_) | | | | | | | (_| |
6+
\____/\___/ \__,_|\___(_)_| |_/\__,_|_.__/ \____/ \__,_| \_/ \__,_| \_| \__,_|\__|_| |_| \____/| .__/|_| |_|_| |_|\__, |
7+
| | __/ |
8+
|_| |___/
9+
${AnsiColor.GREEN}runs on Spring Boot v.${spring-boot.version}.${Ansi.DEFAULT}

0 commit comments

Comments
 (0)