Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pluralsight-projects
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Deep Bhuller
pluralsight-projects
Commits
944573b9
Commit
944573b9
authored
Mar 31, 2021
by
dbhuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
configured application with xml
parent
8f4c5995
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
218 additions
and
0 deletions
+218
-0
.gitignore
...undamentals-project/conference-xmlconfig/.idea/.gitignore
+3
-0
compiler.xml
...damentals-project/conference-xmlconfig/.idea/compiler.xml
+14
-0
jarRepositories.xml
...ls-project/conference-xmlconfig/.idea/jarRepositories.xml
+20
-0
misc.xml
...gfundamentals-project/conference-xmlconfig/.idea/misc.xml
+14
-0
vcs.xml
...ngfundamentals-project/conference-xmlconfig/.idea/vcs.xml
+6
-0
conference-xmlconfig.iml
...als-project/conference-xmlconfig/conference-xmlconfig.iml
+2
-0
pom.xml
...k-springfundamentals-project/conference-xmlconfig/pom.xml
+25
-0
Application.java
...oject/conference-xmlconfig/src/main/java/Application.java
+16
-0
Speaker.java
...ce-xmlconfig/src/main/java/com/example/model/Speaker.java
+22
-0
HibernateSpeakerRepositoryImpl.java
...om/example/repository/HibernateSpeakerRepositoryImpl.java
+21
-0
SpeakerRepository.java
...c/main/java/com/example/repository/SpeakerRepository.java
+9
-0
SpeakerService.java
...fig/src/main/java/com/example/service/SpeakerService.java
+9
-0
SpeakerServiceImpl.java
...src/main/java/com/example/service/SpeakerServiceImpl.java
+27
-0
applicationContext.xml
...rence-xmlconfig/src/main/resources/applicationContext.xml
+15
-0
Application.class
...ect/conference-xmlconfig/target/classes/Application.class
+0
-0
applicationContext.xml
...onference-xmlconfig/target/classes/applicationContext.xml
+15
-0
Speaker.class
...-xmlconfig/target/classes/com/example/model/Speaker.class
+0
-0
HibernateSpeakerRepositoryImpl.class
...m/example/repository/HibernateSpeakerRepositoryImpl.class
+0
-0
SpeakerRepository.class
...et/classes/com/example/repository/SpeakerRepository.class
+0
-0
SpeakerService.class
...g/target/classes/com/example/service/SpeakerService.class
+0
-0
SpeakerServiceImpl.class
...rget/classes/com/example/service/SpeakerServiceImpl.class
+0
-0
No files found.
springframework-springfundamentals-project/conference-xmlconfig/.idea/.gitignore
0 → 100644
View file @
944573b9
# Default ignored files
/shelf/
/workspace.xml
springframework-springfundamentals-project/conference-xmlconfig/.idea/compiler.xml
0 → 100644
View file @
944573b9
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"CompilerConfiguration"
>
<annotationProcessing>
<profile
name=
"Maven default annotation processors profile"
enabled=
"true"
>
<sourceOutputDir
name=
"target/generated-sources/annotations"
/>
<sourceTestOutputDir
name=
"target/generated-test-sources/test-annotations"
/>
<outputRelativeToContentRoot
value=
"true"
/>
<module
name=
"conference-xmlconfig"
/>
<module
name=
"conference"
/>
</profile>
</annotationProcessing>
</component>
</project>
\ No newline at end of file
springframework-springfundamentals-project/conference-xmlconfig/.idea/jarRepositories.xml
0 → 100644
View file @
944573b9
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"RemoteRepositoriesConfiguration"
>
<remote-repository>
<option
name=
"id"
value=
"central"
/>
<option
name=
"name"
value=
"Central Repository"
/>
<option
name=
"url"
value=
"https://repo.maven.apache.org/maven2"
/>
</remote-repository>
<remote-repository>
<option
name=
"id"
value=
"central"
/>
<option
name=
"name"
value=
"Maven Central repository"
/>
<option
name=
"url"
value=
"https://repo1.maven.org/maven2"
/>
</remote-repository>
<remote-repository>
<option
name=
"id"
value=
"jboss.community"
/>
<option
name=
"name"
value=
"JBoss Community repository"
/>
<option
name=
"url"
value=
"https://repository.jboss.org/nexus/content/repositories/public/"
/>
</remote-repository>
</component>
</project>
\ No newline at end of file
springframework-springfundamentals-project/conference-xmlconfig/.idea/misc.xml
0 → 100644
View file @
944573b9
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"ExternalStorageConfigurationManager"
enabled=
"true"
/>
<component
name=
"MavenProjectsManager"
>
<option
name=
"originalFiles"
>
<list>
<option
value=
"$PROJECT_DIR$/pom.xml"
/>
</list>
</option>
</component>
<component
name=
"ProjectRootManager"
version=
"2"
languageLevel=
"JDK_1_8"
project-jdk-name=
"1.8"
project-jdk-type=
"JavaSDK"
>
<output
url=
"file://$PROJECT_DIR$/out"
/>
</component>
</project>
\ No newline at end of file
springframework-springfundamentals-project/conference-xmlconfig/.idea/vcs.xml
0 → 100644
View file @
944573b9
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"VcsDirectoryMappings"
>
<mapping
directory=
"$PROJECT_DIR$/../.."
vcs=
"Git"
/>
</component>
</project>
\ No newline at end of file
springframework-springfundamentals-project/conference-xmlconfig/conference-xmlconfig.iml
0 → 100644
View file @
944573b9
<?xml version="1.0" encoding="UTF-8"?>
<module
type=
"JAVA_MODULE"
version=
"4"
/>
\ No newline at end of file
springframework-springfundamentals-project/conference-xmlconfig/pom.xml
0 → 100644
View file @
944573b9
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
org.example
</groupId>
<artifactId>
conference-xmlconfig
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<dependencies>
<dependency>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-context
</artifactId>
<version>
5.2.13.RELEASE
</version>
</dependency>
</dependencies>
<properties>
<maven.compiler.source>
8
</maven.compiler.source>
<maven.compiler.target>
8
</maven.compiler.target>
</properties>
</project>
\ No newline at end of file
springframework-springfundamentals-project/conference-xmlconfig/src/main/java/Application.java
0 → 100644
View file @
944573b9
import
com.example.service.SpeakerService
;
import
com.example.service.SpeakerServiceImpl
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.support.ClassPathXmlApplicationContext
;
public
class
Application
{
public
static
void
main
(
String
[]
args
)
{
ApplicationContext
appContext
=
new
ClassPathXmlApplicationContext
(
"applicationContext.xml"
);
// SpeakerService service = new SpeakerServiceImpl();
SpeakerService
service
=
appContext
.
getBean
(
"speakerService"
,
SpeakerService
.
class
);
System
.
out
.
println
(
service
.
findALl
().
get
(
0
).
getFirstName
());
}
}
springframework-springfundamentals-project/conference-xmlconfig/src/main/java/com/example/model/Speaker.java
0 → 100644
View file @
944573b9
package
com
.
example
.
model
;
public
class
Speaker
{
private
String
firstName
;
private
String
lastName
;
public
String
getFirstName
()
{
return
firstName
;
}
public
void
setFirstName
(
String
firstName
)
{
this
.
firstName
=
firstName
;
}
public
String
getLastName
()
{
return
lastName
;
}
public
void
setLastName
(
String
lastName
)
{
this
.
lastName
=
lastName
;
}
}
springframework-springfundamentals-project/conference-xmlconfig/src/main/java/com/example/repository/HibernateSpeakerRepositoryImpl.java
0 → 100644
View file @
944573b9
package
com
.
example
.
repository
;
import
com.example.model.Speaker
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
HibernateSpeakerRepositoryImpl
implements
SpeakerRepository
{
@Override
public
List
<
Speaker
>
findAll
()
{
List
<
Speaker
>
speakerList
=
new
ArrayList
<
Speaker
>();
Speaker
speaker
=
new
Speaker
();
speaker
.
setFirstName
(
"Deep"
);
speaker
.
setLastName
(
"Bhuller"
);
speakerList
.
add
(
speaker
);
return
speakerList
;
}
}
springframework-springfundamentals-project/conference-xmlconfig/src/main/java/com/example/repository/SpeakerRepository.java
0 → 100644
View file @
944573b9
package
com
.
example
.
repository
;
import
com.example.model.Speaker
;
import
java.util.List
;
public
interface
SpeakerRepository
{
List
<
Speaker
>
findAll
();
}
springframework-springfundamentals-project/conference-xmlconfig/src/main/java/com/example/service/SpeakerService.java
0 → 100644
View file @
944573b9
package
com
.
example
.
service
;
import
com.example.model.Speaker
;
import
java.util.List
;
public
interface
SpeakerService
{
List
<
Speaker
>
findALl
();
}
springframework-springfundamentals-project/conference-xmlconfig/src/main/java/com/example/service/SpeakerServiceImpl.java
0 → 100644
View file @
944573b9
package
com
.
example
.
service
;
import
com.example.model.Speaker
;
import
com.example.repository.SpeakerRepository
;
import
java.util.List
;
public
class
SpeakerServiceImpl
implements
SpeakerService
{
private
SpeakerRepository
repository
;
public
SpeakerServiceImpl
()
{
}
public
SpeakerServiceImpl
(
SpeakerRepository
repository
)
{
this
.
repository
=
repository
;
}
@Override
public
List
<
Speaker
>
findALl
()
{
return
repository
.
findAll
();
}
public
void
setRepository
(
SpeakerRepository
repository
)
{
this
.
repository
=
repository
;
}
}
springframework-springfundamentals-project/conference-xmlconfig/src/main/resources/applicationContext.xml
0 → 100644
View file @
944573b9
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns=
"http://www.springframework.org/schema/beans"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"
>
<bean
name=
"speakerRepository"
class=
"com.example.repository.HibernateSpeakerRepositoryImpl"
/>
<bean
name=
"speakerService"
class=
"com.example.service.SpeakerServiceImpl"
autowire=
"byType"
>
<!-- <constructor-arg index="0" ref="speakerRepository" />-->
<!-- <property name="speakerRepository" ref="speakerRepository" />-->
</bean>
</beans>
\ No newline at end of file
springframework-springfundamentals-project/conference-xmlconfig/target/classes/Application.class
0 → 100644
View file @
944573b9
File added
springframework-springfundamentals-project/conference-xmlconfig/target/classes/applicationContext.xml
0 → 100644
View file @
944573b9
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns=
"http://www.springframework.org/schema/beans"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"
>
<bean
name=
"speakerRepository"
class=
"com.example.repository.HibernateSpeakerRepositoryImpl"
/>
<bean
name=
"speakerService"
class=
"com.example.service.SpeakerServiceImpl"
autowire=
"byType"
>
<!-- <constructor-arg index="0" ref="speakerRepository" />-->
<!-- <property name="speakerRepository" ref="speakerRepository" />-->
</bean>
</beans>
\ No newline at end of file
springframework-springfundamentals-project/conference-xmlconfig/target/classes/com/example/model/Speaker.class
0 → 100644
View file @
944573b9
File added
springframework-springfundamentals-project/conference-xmlconfig/target/classes/com/example/repository/HibernateSpeakerRepositoryImpl.class
0 → 100644
View file @
944573b9
File added
springframework-springfundamentals-project/conference-xmlconfig/target/classes/com/example/repository/SpeakerRepository.class
0 → 100644
View file @
944573b9
File added
springframework-springfundamentals-project/conference-xmlconfig/target/classes/com/example/service/SpeakerService.class
0 → 100644
View file @
944573b9
File added
springframework-springfundamentals-project/conference-xmlconfig/target/classes/com/example/service/SpeakerServiceImpl.class
0 → 100644
View file @
944573b9
File added
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment