GithubHelp home page GithubHelp logo

spring-data-examples's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spring-data-examples's Issues

Add examples for web support

  • Resolving Pageable instances from the request.
  • Using interfaces to bind request data to controller method arguments.

Only build jars with main-class if needed.

Currently a mvn clean installin the examples root fails because the default configuration for the spring boot maven plugin looks for a main class in every project and cannot find one in some cases.

Spring Boot 1.2.0 contains ca skip property with which you can disable that, but since we're on 1.1.8 right now we have to do something else.
http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/maven-plugin/repackage-mojo.html#skip

Fortunately if we configure the layout-property of the spring-boot-maven-plugin to NONE in the parent pom - we avoid creating jars and thus avoid the problem.
http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/maven-plugin/repackage-mojo.html#layout

<build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>

                <configuration>
                    <layout>NONE</layout>
                </configuration>
            </plugin>
        </plugins>
    </build>

For those project where we actually need the main methods we can just define the layout and the main class explicitly.

like for the starbucks example:

<build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <mainClass>example.stores.StoreApp</mainClass>
                    <layout>JAR</layout>
                </configuration>
            </plugin>
        </plugins>
    </build>

Create a (simple as possible) web UI for the REST / Starbucks example

To showcase the Starbucks store search built on top of Spring Data MongoDB and Spring Data REST a bit better it would be cool to have a minimal UI consisting of the following:

  • UI controls to define the input location. This could be direct inputs for longitude and latitude, a button to obtain the location from the browser and maybe two or three predefined spots (e.g. Times Square, NY)
  • UI controls to define the distance
  • A result view that lists the found results and optionally (read: in case internet access is available) displays a map to visualize the results.

I'd prefer the most simple solution that could possibly work. Letting the general functionality work without JavaScript (enter location and receive the results) would be nice to have but is not required as I am assuming that to require an additional controller and template rendering which might add too much additional code and distract from the main focus.

Please, no JavaScript package managers involved. We need Maven and MongoDB to be the only infrastructure requirements. This is all that can be expected by the users:

$ git clone https://github.com/spring-projects/spring-data-examples
$ cd spring-data-examples/rest/starbucks
$ mvn spring-boot:run &
$ open http://localhost:8080

A core requirement is that the client must use hypermedia to discover the resource providing the search results based on this information:

  • a set of link relations that will allow the client to discover the final resource.
  • a description of the input parameters of the URI template of the search resource.

Appreciate all PRs submitted but will probably resort to the simplest one submitted.

Spring attempts to create a query for custom JPA Repository method

Hi,

I created a custom JPA Repository as shown in the examples, but when I use it Spring attempts to find a property for the @Entity base on the method name of the custom Repository, e.g.:

interface UserRepositoryCustom {

    /**
     * Custom repository operation.
     * 
     * @return
     */
    List<User> myCustomBatchOperation();
}

Then Spring throws a PropertyReferenceException with this message:

No property my found for type User

I'm using Spring Boot 1.1.4, which in turn uses spring-data-commons-1.8.1 and spring-data-jpa-1.6.1.

Thanks,

Mariano.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.