Skip to content
Permalink
Browse files
Move PetStore to Juneau 8.1.2
  • Loading branch information
jamesbognar committed Dec 11, 2019
1 parent 98a90f3 commit eb87f8b7b0d5c79b188a072b2314fda876190f59
Showing 11 changed files with 29 additions and 11 deletions.
@@ -37,7 +37,7 @@
* <li class='extlink'>{@source}
* </ul>
*/
@RemoteResource(path="/petstore")
@Remote(path="/petstore")
public interface PetStore {

//------------------------------------------------------------------------------------------------------------------
@@ -33,7 +33,7 @@ public class CreateOrder {
* @param petId The <bc>petId</bc> property value.
* @param username The <bc>username</bc> property value.
*/
@BeanConstructor(properties="petId,username")
@Beanc(properties="petId,username")
public CreateOrder(long petId, String username) {
this.petId = petId;
this.username = username;
@@ -40,7 +40,7 @@ public static void main(String[] args) {
try (RestClient rc = RestClient.create(SimpleJsonSerializer.class, JsonParser.class).build()) {

// Instantiate our proxy.
PetStore petStore = rc.getRemoteResource(PetStore.class, "http://localhost:5000");
PetStore petStore = rc.getRemote(PetStore.class, "http://localhost:5000");

// Print out the pets in the store.
Collection<Pet> pets = petStore.getPets();
@@ -41,7 +41,7 @@

<maven.javadoc.skip>true</maven.javadoc.skip>

<juneau.version>8.1.1</juneau.version>
<juneau.version>8.1.2</juneau.version>
<javax.inject.version>1</javax.inject.version>
<servlet.version>3.1.0</servlet.version>
<hibernate.version>5.0.9.Final</hibernate.version>
@@ -6,6 +6,9 @@
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;

/**
* TODO - Needs documentation
*/
@Configuration
public class SpringSecurityConfig extends WebSecurityConfigurerAdapter{

@@ -4,6 +4,9 @@
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

/**
* TODO - Needs documentation
*/
@Repository
public interface OrderRepository extends JpaRepository <Order, Long>{

@@ -9,11 +9,17 @@
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

/**
* TODO - Needs documentation
*/
@Repository
public interface PetRepository extends JpaRepository <Pet, Long> {

@SuppressWarnings("javadoc")
@Query("select X from PetstorePet X where X.tags in :tags")
List<Pet> findByTags(@Param("tags") String[] tags);

List<Pet> findByTags(@Param("tags") String[] tags);

@SuppressWarnings("javadoc")
@Query("select X from PetstorePet X where X.status in :status")
List<Pet> findByStatus(@Param("status") PetStatus[] status);
List<Pet> findByStatus(@Param("status") PetStatus[] status);
}
@@ -6,9 +6,15 @@
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

/**
* TODO - Needs documentation
*/
@Repository
public interface UserRepository extends JpaRepository <User, Long>{


@SuppressWarnings("javadoc")
User findByUsername(String username);

@SuppressWarnings("javadoc")
Long deleteByUsername(String username);
}
@@ -45,7 +45,7 @@
* <li class='extlink'>{@source}
* </ul>
*/
@RestResource(
@Rest(
path="/petstore",
title="Petstore application",
description={
@@ -25,7 +25,7 @@
* <li class='extlink'>{@source}
* </ul>
*/
@RestResource(
@Rest(
path="/*",
title="Root resources",
description="Example of a router resource page.",
@@ -38,7 +38,7 @@
<junit.version>4.11</junit.version>
<servlet.version>3.1.0</servlet.version>
<httpclient.version>4.5.6</httpclient.version>
<juneau.version>8.1.1</juneau.version>
<juneau.version>8.1.2</juneau.version>
<derby.version>10.10.2.0</derby.version>
<hibernate.version>5.0.9.Final</hibernate.version>
<javax.inject.version>1</javax.inject.version>

0 comments on commit eb87f8b

Please sign in to comment.