Using @Scheduled and @EnableScheduling but gives NoSuchBeanDefinitionException

according to exception Info Could not find default TaskScheduler bean, the config should define TaskScheduler rather than “Executor” @Configuration public class AppContext extends WebMvcConfigurationSupport { @Bean public TaskScheduler taskScheduler() { return new ConcurrentTaskScheduler(); } // Of course , you can define the Executor too @Bean public Executor taskExecutor() { return new SimpleAsyncTaskExecutor(); } }

Relation between WebSecurityConfigurerAdapter and ResourceServerConfigurerAdapter

Here is a good answer https://stackoverflow.com/a/28604260, it looks like WebSecurityConfigurerAdapter is an order inferior to the ResourceServerConfigurerAdapter. I have a WebSecurityConfigurerAdapter and a ResourceServerConfigurerAdapter, but the endpoints security configuration is in the ResourceServerConfigurerAdapter under: public void configure(HttpSecurity http) throws Exception { I also have the following configuration: security: oauth2: resource: filter-order: 3 Else the endpoints … Read more

How to use JasperReports with Spring MVC?

Based on my research, I’ve found the following usage methods. The methods begin with the most direct (naive) approach involving less up front complexity / configuration and evolve to become more abstract but with more dependencies on Spring / more complex Spring configuration. Method 1: Use the JasperReports API directly in the Controller Just write … Read more

Multiple scenarios @RequestMapping produces JSON/XML together with Accept or ResponseEntity

Using Accept header is really easy to get the format json or xml from the REST service. This is my Controller, take a look produces section. @RequestMapping(value = “properties”, produces = {MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_XML_VALUE}, method = RequestMethod.GET) public UIProperty getProperties() { return uiProperty; } In order to consume the REST service we can use the code … Read more

AbstractMethodError on deploying Spring 4.0 in Tomcat 6

The error has nothing to do with the EL. It has all to do with the javax.validation api and hibernate. java.lang.AbstractMethodError: org.hibernate.validator.internal.engine.ConfigurationImpl.getDefaultParameterNameProvider()Ljavax/validation/ParameterNameProvider Hibernate validator 4.3.x is an implementation of javax.validation 1.0 (JSR-303). However you are including the 1.1 API version. Either downgrade the included javax.validation version or upgrade your hibernate validator to 5.0.x.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)