Skip to content

omichal/spring-graphq-no-bean-resolver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spring-graphq-no-bean-resolver

Run application

./gradlew bootRun

Open http://localhost:8080/graphiql?path=/graphql and run query

query {
  myEntities {
    name
  }
}

This returns (correctly)

{
  "data": {
    "myEntities": [
      {
        "name": "static value"
      }
    ]
  }
}

Now change MyEntityProjection.getName() @Value annotation to

@Value("#{@myBean.getName()}")

and rerun the application.

According to https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#projections, the value should refer to MyBean.getName() method. Instead, org.springframework.expression.spel.SpelEvaluationException: EL1057E: No bean resolver registered in the context to resolve access to bean 'myBean' is thrown.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages