Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
java_weekendowa_20221008
Overview
Overview
Details
Activity
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
Patryk Czarnik
java_weekendowa_20221008
Commits
d9ae4373
Commit
d9ae4373
authored
Dec 11, 2022
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wielomodulowy-Ear
parent
7074bd7e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
27 deletions
+27
-27
pom.xml
PC38-Wielomodulowy/PC38-Wielomodulowy-Ear/pom.xml
+25
-0
PrzykladoweZapytanie.java
...ient/src/main/java/sklep/klient/PrzykladoweZapytanie.java
+0
-26
Ustawienia.java
...owy-RestKlient/src/main/java/sklep/klient/Ustawienia.java
+1
-1
pom.xml
PC38-Wielomodulowy/pom.xml
+1
-0
No files found.
PC38-Wielomodulowy/PC38-Wielomodulowy-Ear/pom.xml
0 → 100644
View file @
d9ae4373
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<groupId>
pl.alx.kjava.wielomodulowy
</groupId>
<artifactId>
PC38-Wielomodulowy
</artifactId>
<version>
1.0
</version>
</parent>
<artifactId>
PC38-Wielomodulowy-Ear
</artifactId>
<packaging>
ear
</packaging>
<dependencies>
<dependency>
<groupId>
${project.groupId}
</groupId>
<artifactId>
PC38-Wielomodulowy-Web
</artifactId>
<version>
${project.version}
</version>
<type>
war
</type>
</dependency>
<dependency>
<groupId>
${project.groupId}
</groupId>
<artifactId>
PC38-Wielomodulowy-RestSerwer
</artifactId>
<version>
${project.version}
</version>
<type>
war
</type>
</dependency>
</dependencies>
</project>
PC38-Wielomodulowy/PC38-Wielomodulowy-RestKlient/src/main/java/sklep/klient/PrzykladoweZapytanie.java
deleted
100644 → 0
View file @
7074bd7e
package
sklep
.
klient
;
import
javax.ws.rs.client.Client
;
import
javax.ws.rs.client.ClientBuilder
;
import
javax.ws.rs.core.Response
;
public
class
PrzykladoweZapytanie
{
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
"Buduję klienta"
);
Client
client
=
ClientBuilder
.
newClient
();
System
.
out
.
println
(
"Wysyłam zapytanie..."
);
Response
response
=
client
.
target
(
"http://localhost:8080/PC35-RestSerwer-1.0/products.json/1"
)
.
request
().
buildGet
().
invoke
();
System
.
out
.
println
(
"Mam odpowiedź: "
+
response
);
System
.
out
.
println
(
"Kod: "
+
response
.
getStatus
());
System
.
out
.
println
(
"Content-type: "
+
response
.
getMediaType
());
String
trescOdpowiedzi
=
response
.
readEntity
(
String
.
class
);
System
.
out
.
println
(
"Treść odpowiedzi:"
);
System
.
out
.
println
(
trescOdpowiedzi
);
}
}
PC38-Wielomodulowy/PC38-Wielomodulowy-RestKlient/src/main/java/sklep/klient/Ustawienia.java
View file @
d9ae4373
...
@@ -4,7 +4,7 @@ import javax.ws.rs.core.MediaType;
...
@@ -4,7 +4,7 @@ import javax.ws.rs.core.MediaType;
public
class
Ustawienia
{
public
class
Ustawienia
{
public
static
final
String
URL_SERWERA
=
"http://localhost:8080/PC38-Wielomodulowy-RestSerwer
-1.0
/"
;
public
static
final
String
URL_SERWERA
=
"http://localhost:8080/PC38-Wielomodulowy-RestSerwer/"
;
public
static
String
rozszerzenieDlaTypu
(
MediaType
mediaType
)
{
public
static
String
rozszerzenieDlaTypu
(
MediaType
mediaType
)
{
switch
(
mediaType
.
getSubtype
())
{
switch
(
mediaType
.
getSubtype
())
{
...
...
PC38-Wielomodulowy/pom.xml
View file @
d9ae4373
...
@@ -16,5 +16,6 @@
...
@@ -16,5 +16,6 @@
<module>
PC38-Wielomodulowy-RestSerwer
</module>
<module>
PC38-Wielomodulowy-RestSerwer
</module>
<module>
PC38-Wielomodulowy-RestKlient
</module>
<module>
PC38-Wielomodulowy-RestKlient
</module>
<module>
PC38-Wielomodulowy-Web
</module>
<module>
PC38-Wielomodulowy-Web
</module>
<module>
PC38-Wielomodulowy-Ear
</module>
</modules>
</modules>
</project>
</project>
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