spring-mvc Questions

2

I'm trying to write full multipart flow, from the client side sending multipart request using Spring restTemplate and from the server side auto resolve the different parts to objects (I'm using JAX...
Youngs asked 22/2, 2013 at 15:14

7

Solved

I have a Dropwizard application that needs to generate a dozen or so beans for each of the configs in a configuration list. Things like health checks, quartz schedulers, etc. Something like this: ...
Festinate asked 6/2, 2015 at 20:13

33

IntelliJ IDEA is showing errors when I use Spring's @Autowired annotation in the class, but the class is functioning without any problem. Here is this error message: Autowired members must be ...
Baillargeon asked 24/1, 2014 at 2:28

5

Getting the following error when trying to run a spring mvc application with hibernate in eclipse. java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer org.spring...
Dunc asked 20/9, 2012 at 9:16

3

Solved

In my spring application, the methods from my controller and service classes have this annotation to security purposes: @PreAuthorize("hasPermission(#user, 'cadastra')") the second argument, the...
Otes asked 9/6, 2014 at 13:23

43

Solved

When I compile my spring project, I got the following error. Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa...
Opalescent asked 15/10, 2016 at 10:40

5

Solved

"I am using spring maven project and want to implement Scaffolding in it so that I can generate DAO's, services and spring form dynamically depending upon model. How it can be achieved?"
Spearwort asked 2/1, 2013 at 10:4

12

Solved

I have been following the Spring Security Reference and i added only this classes: @Configuration @EnableWebMvcSecurity public class WebSecurityConfig extends WebSecurityConfigurerAdapter { @Ove...
Troxell asked 19/2, 2015 at 20:47

2

Solved

I am using spring security and I implemented UserDetailsService which perfectly handles my user login process. The question is this: Is there a standard way to check the user status from database ...
Sanjiv asked 3/11, 2014 at 23:42

6

Solved

I have added the dependency in pom.xml <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>3.1</version>...
Italianize asked 10/4, 2013 at 7:11

4

Solved

How can I set up a bean which will created once per request. I Tried to do like this : @Component @Scope(value = "request") public class TestBean { @PostConstruct public void init() { Syst...
Kamila asked 6/2, 2013 at 14:9

16

Solved

I have a problem with Hibernate. I try to parse to List but It throws an exception: HTTP Status 500 - could not extract ResultSet. When I debug, It fault at line query.list()... My sample code he...
Rimple asked 20/11, 2013 at 6:32

26

Solved

I have a Spring MVC application and a problem with JUnit tests combined with the file applicationContext.xml. In my JUnit test class I write: final ApplicationContext context = new ClassPathXmlAp...
Smallage asked 11/10, 2010 at 15:55

2

I'm trying to get a better handle on the use of Spring's @Transactional attribute. I understand that it basically wraps the contents of the method marked as @Transactional in a transaction. Would i...
Umbrageous asked 5/6, 2015 at 13:36

20

Solved

In the custom AuthenticationProvider from my spring project, I am trying read the list of authorities of the logged user, but I am facing the following error: org.hibernate.LazyInitializationExcep...
Cathodoluminescence asked 2/4, 2014 at 19:56

4

Solved

May be I am doing it worng by using MultipartFile upload feature. I have to read data from csv file which will be chosen by the client through the browser. I used MultipartFile to upload file. The...
Joletta asked 15/10, 2015 at 8:40

4

I am currently working through the example on scheduling tasks using Spring 4, Java 1.8, and Gradle (https://spring.io/guides/gs/scheduling-tasks/). However, when running this example, I receive t...
Comanchean asked 13/12, 2016 at 19:59

28

I can't get my Spring-boot project to serve static content. I've placed a folder named static under src/main/resources. Inside it I have a folder named images. When I package the app and run it, i...
Arianism asked 9/7, 2014 at 18:31

12

Solved

Recently I have added Spring Security to my Spring Boot project using the following class: @EnableWebSecurity @EnableGlobalMethodSecurity(prePostEnabled = true) public class MySecurityConfig { } ...
Staphylorrhaphy asked 1/12, 2017 at 12:35

4

Solved

I have an API endpoint which, when called with GET, returns an array of JSON objects in the body, like this: [ {"id": "321", "created": "2019-03-01", "updated": "2019-03-15"}, {"id": "123", "cre...
Krugersdorp asked 20/3, 2019 at 19:45

8

Solved

I'm using Spring Security in my Spring MVC app. JdbcUserDetailsManager is initialized with the following query for authentication: select username, password, enabled from user where username = ? ...
Vichyssoise asked 2/1, 2013 at 13:15

7

Enabled CSRF in my Spring MVC application using Spring security 3.2. My spring-security.xml <http> <intercept-url pattern="/**/verify" requires-channel="https"/> &...
Sibylsibylla asked 20/3, 2014 at 5:49

2

I supposed that I had a parent Class Parameter that has 2 sub classes ComboParameter and IntegerParameter @JsonSubTypes({ @JsonSubTypes.Type(value = IntegerParameter.class, name = "integerParam")...
Mcgannon asked 11/3, 2015 at 17:11

4

Solved

After I modified Consuming a RESTful Web Service example to call get users by id from api.stackexchange.com I get JsonParseException: com.fasterxml.jackson.core.JsonParseException: Illegal charact...
Grandiloquent asked 22/12, 2015 at 11:41

4

Solved

I have spring boot client that consumes a restful api. Instead of hardcoding the IP address of the REST API in the java class, is there any key entry in the application.properties I can use? And ...
Hortative asked 17/8, 2015 at 20:7

© 2022 - 2024 — McMap. All rights reserved.