Skip to content

Commit c2dcb32

Browse files
committed
update
1 parent 34dc6c3 commit c2dcb32

File tree

3 files changed

+23
-6
lines changed

3 files changed

+23
-6
lines changed

MVC1.0-samples/MVC-TiposRetornos/run-mvn.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export PATH=${JAVA_HOME}/bin:${PATH}
2222
export MAVEN_HOME=/home/daniel/desenvolvimento/apache-maven-3.5.4
2323
export PATH=${MAVEN_HOME}/bin:${PATH}
2424

25-
mvn clean package payara-micro:bundle
25+
mvn clean package -Ppayara payara-micro:bundle
2626

2727
printf "\n"
2828

MVC1.0-samples/MVC-TiposRetornos/src/main/java/br/org/soujava/rio/application/APP.java

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,31 @@
2222
*/
2323
package br.org.soujava.rio.application;
2424

25+
import java.util.HashMap;
26+
import java.util.Map;
27+
2528
import javax.ws.rs.ApplicationPath;
2629
import javax.ws.rs.core.Application;
2730

31+
import org.mvcspec.ozark.Properties;
32+
2833
/**
2934
* @author Daniel Dias
3035
* github:Daniel-Dos
3136
* daniel.dias@soujava.org.br
3237
* twitter:@danieldiasjava
3338
*/
3439
@ApplicationPath("app")
35-
public class APP extends Application {}
40+
public class APP extends Application {
41+
42+
/* (non-Javadoc)
43+
* @see javax.ws.rs.core.Application#getProperties()
44+
*/
45+
@Override
46+
public Map<String, Object> getProperties() {
47+
Map<String,Object> ma= new HashMap<>();
48+
ma.put(Properties.DEFAULT_VIEW_FILE_EXTENSION, "jsp");
49+
return ma;
50+
51+
}
52+
}

MVC1.0-samples/MVC-TiposRetornos/src/main/java/br/org/soujava/rio/controller/RetornosController.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public class RetornosController {
4646
private Models models;
4747

4848
@GET
49-
@View("retorno.jsp")
49+
@View("retorno")
5050
@Path("void")
5151
public void getView() {
5252
this.models.put("retorno", "Retorno do tipo void usando @View");
@@ -56,20 +56,20 @@ public void getView() {
5656
@Path("String")
5757
public String getString() {
5858
this.models.put("retorno", "Retorno do tipo String");
59-
return "retorno.jsp";
59+
return "retorno";
6060
}
6161

6262
@GET
6363
@Path("Response")
6464
public Response getResponse() {
6565
this.models.put("retorno", "Retorno do Tipo Response do Jax-RS");
66-
return Response.status(Response.Status.OK).entity("retorno.jsp").build();
66+
return Response.status(Response.Status.OK).entity("retorno").build();
6767
}
6868

6969
@GET
7070
@Path("ViewAble")
7171
public Viewable getViewAble() {
7272
this.models.put("retorno", "Retorno do Tipo Viewable,especifico da RI OZARK");
73-
return new Viewable("retorno.jsp");
73+
return new Viewable("retorno");
7474
}
7575
}

0 commit comments

Comments
 (0)