Skip to content
Advertisement

Tag: spring

Spring Boot: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean

I am totally new to Spring and started to do the official guides from this site: https://spring.io/guides I’d like to do this guide: https://spring.io/guides/gs/scheduling-tasks/ I get the following Exception: The application starter class is this: As you can see, the main method contains a commented line. I’ve already done a tutorial, namely this one: https://spring.io/guides/gs/consuming-rest/ It’s up and running. But

how to capture connection event in my webSocket server with Spring 4?

I did a simple web socket communication with spring 4,STOMP and sock.js, following this https://github.com/rstoyanchev/spring-websocket-portfolio and this http://assets.spring.io/wp/WebSocketBlogPost.html well, I want to know if is possible capture connection events like when a new client was connected to my server or when a client was disconnected, is that possible in Spring 4.0.0? Answer This an be done with a connection handshake

What are template classes in Spring Java? Why are they called templates? For example jdbc-template, jms-template etc

I’m new to Java. I’ve only been programming it for about a year. What does Spring mean by the use of templates? In Spring, there is jdbc-templates, jms-templates etc.. What are template classes in java? Are they a special kind of design pattern or what? Thank you in advance. Answer They are called template as use the Template method pattern.

How to configure UCanAccess JDBC driver with Spring?

Whenever I tried to use an ODBC driver to access MDB files, it gave me an error: So I decided to use the UCanAccess JDBC driver instead. Does anyone have experience configuring UCanAccess JDBC driver with Spring? I’ve put the UCanAccess.jar into my lib folder and configured it like below, but that doesn’t work: My development environment: Spring Framework 3.x

Spring HttpInputMessage encoding

Is there any way to get the content encoding from the [HttpInputMessage][1] into a HttpMessageConverter? I browsed the documentation but I cannot find any relevant info. Answer I’m not sure I understand exactly what you want. If by encoding you mean the Content-Encoding or Content-Type header, then all you have to do is

Add context path to Spring Boot application

I am trying to set a Spring Boot applications context root programmatically. The reason for the context root is we want the app to be accessed from localhost:port/{app_name} and have all the controller paths append to it. Here is the application configuration file for the web-app. Here is the index controller for the main page. The new root of the

Why is my Spring @Autowired field null?

Note: This is intended to be a canonical answer for a common problem. I have a Spring @Service class (MileageFeeCalculator) that has an @Autowired field (rateService), but the field is null when I try to use it. The logs show that both the MileageFeeCalculator bean and the MileageRateService bean are being created, but I get a NullPointerException whenever I try

Advertisement