Coder Social home page Coder Social logo

spring-guides / getting-started-guides Goto Github PK

View Code? Open in Web Editor NEW
519.0 54.0 204.0 590 KB

Getting Started Guide template :: The template for new guides and also the place to request them.

Home Page: https://github.com/spring-guides/getting-started-guides/wiki

License: Apache License 2.0

Java 96.03% Shell 3.97%
spring-boot

getting-started-guides's Introduction

This guide walks you through the process of applying circuit breakers to potentially-failing method calls using Spring Cloud Circuit Breaker.

What you’ll build

You’ll build a microservice application that uses the Circuit Breaker pattern to gracefully degrade functionality when a method call fails. Use of the Circuit Breaker pattern can allow a microservice to continue operating when a related service fails, preventing the failure from cascading and giving the failing service time to recover.

Build with Gradle

Build with Gradle

bookstore/build.gradle

link:https://raw.githubusercontent.com/spring-guides/gs-spring-cloud-circuitbreaker/main/initial/bookstore/build.gradle[role=include]

reading/build.gradle

link:https://raw.githubusercontent.com/spring-guides/gs-spring-cloud-circuitbreaker/main/initial/reading/build.gradle[role=include]

Build with Maven

Build with Maven

bookstore/pom.xml

link:https://raw.githubusercontent.com/spring-guides/gs-spring-cloud-circuitbreaker/main/initial/bookstore/pom.xml[role=include]

reading/pom.xml

link:https://raw.githubusercontent.com/spring-guides/gs-spring-cloud-circuitbreaker/main/initial/reading/pom.xml[role=include]

Set up a server microservice application

The Bookstore service will have a single endpoint. It will be accessible at /recommended, and will (for simplicity) return a Mono of String recommended reading list.

Edit our main class, in BookstoreApplication.java. It should look like this:

bookstore/src/main/java/hello/BookstoreApplication.java

link:complete/bookstore/src/main/java/hello/BookstoreApplication.java[role=include]

The @RestController annotation marks BookstoreApplication as a controller class, like @Controller does, and also ensures that @RequestMapping methods in this class will behave as though annotated with @ResponseBody. That is, the return values of @RequestMapping methods in this class will be automatically converted appropriately from their original types and will be written directly to the response body.

We’re going to run this application locally alongside a client service application, so in src/main/resources/application.properties, set server.port so that the Bookstore service won’t conflict with the client when we get that running.

bookstore/src/main/resources/application.properties

link:complete/bookstore/src/main/resources/application.properties[role=include]

Set up a client microservice application

The Reading application will be our front-end (as it were) to the Bookstore application. We’ll be able to view our reading list there at /to-read, and that reading list will be retrieved from the Bookstore service application.

reading/src/main/java/hello/ReadingApplication.java

package hello;

import reactor.core.publisher.Mono;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.reactive.function.client.WebClient;

@RestController
@SpringBootApplication
public class ReadingApplication {

  @RequestMapping("/to-read")
    public Mono<String> toRead() {
      return WebClient.builder().build()
      .get().uri("http://localhost:8090/recommended").retrieve()
      .bodyToMono(String.class);
  }

  public static void main(String[] args) {
    SpringApplication.run(ReadingApplication.class, args);
  }
}

To get the list from Bookstore, we’re using Spring’s WebClient class. WebClient makes an HTTP GET request to the Bookstore service’s URL as we provide it and then returns the result as a Mono of String. (For more information on using Spring to consume a RESTful service using WebClient, see the Building a Reactive RESTful Web Service guide.)

Add the server.port property to src/main/resources/application.properties:

reading/src/main/resources/application.properties

link:complete/reading/src/main/resources/application.properties[role=include]

We now can access, in a browser, the /to-read endpoint on our Reading application, and see our reading list. Yet since we rely on the Bookstore application, if anything happens to it, or if Reading is simply unable to access Bookstore, we’ll have no list and our users will get a nasty HTTP 500 error message.

Apply The Circuit Breaker Pattern

Spring Cloud’s Circuit Breaker library provides an implementation of the Circuit Breaker pattern: when we wrap a method call in a circuit breaker, Spring Cloud Circuit Breaker watches for failing calls to that method, and if failures build up to a threshold, Spring Cloud Circuit Breaker opens the circuit so that subsequent calls automatically fail. While the circuit is open, Spring Cloud Circuit Breaker redirects calls to the method, and they’re passed on to our specified fallback method.

Spring Cloud Circuit Breaker supports many different circuit breaker implementations including, Resilience4J, Hystrix, Sentinal, and Spring Retry. In this guide we will use the Resilience4J implementation. To use this implementation we just need to add spring-cloud-starter-circuitbreaker-reactor-resilience4j to our application’s classpath.

reading/pom.xml

link:complete/reading/pom.xml[role=include]

reading/build.gradle

link:complete/reading/build.gradle[role=include]

Spring Cloud Circuit Breaker provides an interface called ReactiveCircuitBreakerFactory which we can use to create new circuit breakers for our application. An implementation of this interface will be auto-configured based on the starter that is on your application’s classpath. Lets create a new service that uses this interface to make API calls to the Bookstore application

reading/src/main/java/hello/BookService.java

link:complete/reading/src/main/java/hello/BookService.java[role=include]

The ReactiveCircuitBreakerFactory has a single method called create we can use to create new circuit breakers. Once we have our circuit breaker all we have to do is call run. Run takes a Mono or Flux and an optional Function. The optional Function parameter acts as our fallback if anything goes wrong. In our sample here the fallback will just return a Mono containing the String Cloud Native Java (O’Reilly).

With our new service in place, we can update the code in ReadingApplication to use this new service.

reading/src/main/java/hello/ReadingApplication.java

link:complete/reading/src/main/java/hello/ReadingApplication.java[role=include]

Try it out

Run both the Bookstore service and the Reading service, and then open a browser to the Reading service, at localhost:8080/to-read. You should see the complete recommended reading list:

Spring in Action (Manning), Cloud Native Java (O'Reilly), Learning Spring Boot (Packt)

Now shut down the Bookstore application. Our list source is gone, but thanks to Hystrix and Spring Cloud Netflix, we have a reliable abbreviated list to stand in the gap; you should see:

Cloud Native Java (O'Reilly)

Summary

Congratulations! You’ve just developed a Spring application that uses the Circuit Breaker pattern to protect against cascading failures and to provide fallback behavior for potentially failing calls.

getting-started-guides's People

Contributors

bclozel avatar buzzardo avatar gregturn avatar royclarkson avatar ryanjbaxter avatar sergiovlvitorino avatar spring-operator avatar

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

getting-started-guides's Issues

where to see the results??

Hi, I have tried this and it is running but where to see the results it is showing requesting forecast and after that

hello.WeatherClient : Requesting forecast for 94304
2016-09-16 23:09:30.697 INFO 3477 --- [ main] hello.Application : Started Application in 15.265 seconds (JVM running for 18.521)
2016-09-16 23:09:30.702 INFO 3477 --- [ Thread-1] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@d8cfe0: startup date [Fri Sep 16 23:09:19 IST 2016]; root of context hierarchy
2016-09-16 23:09:30.724 INFO 3477 --- [ Thread-1] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown
pi@raspberrypi:~/gs-consuming-web-service/initial $

So, where to see the results

Uploading Files Guide doesn't mention Thymeleaf dependency

I went over the https://spring.io/guides/gs/uploading-files/ guide and to my surprise got a Whitelabel Error Page rather the expected output.

After googling around and seeing people having similar problems and I figured it out. I had to have Thymeleaf as a dependency. I contributed the answer at http://stackoverflow.com/questions/31134333/spring-uploadthis-application-has-no-explicit-mapping-for-error/

I think if you mention in the Guide that you need to have that dependency then less people would get the Whitelabel Error.

Edgware.SR3 Spring Cloud Release took place

Spring Cloud [Edgware.SR3] Released with the following projects:

spring-cloud-task : 1.2.2.RELEASE
spring-boot-dependencies : 1.5.10.RELEASE
spring-cloud-consul : 1.3.3.RELEASE
spring-cloud-zookeeper : 1.2.1.RELEASE
spring-cloud-stream : Ditmars.SR3
spring-cloud-config : 1.4.3.RELEASE
spring-cloud-cloudfoundry : 1.1.1.RELEASE
spring-cloud-dependencies : 1.3.8.RELEASE
spring-cloud-vault : 1.1.0.RELEASE
spring-cloud-netflix : 1.4.4.RELEASE
spring-cloud-security : 1.2.2.RELEASE
spring-cloud-sleuth : 1.3.3.RELEASE
spring-cloud-commons : 1.3.3.RELEASE
spring-cloud-contract : 1.2.4.RELEASE
spring-cloud-aws : 1.2.2.RELEASE
spring-boot-starter : 1.5.10.RELEASE
spring-cloud-build : 1.3.8.RELEASE
spring-cloud-bus : 1.3.3.RELEASE
spring-boot : 1.5.10.RELEASE
spring-cloud-gateway : 1.0.1.RELEASE

Consuming a RESTful Web Service doesn't has info about nested list in a JSON

I'm currently working on a new spring based project and i had this problem again. It's very common (or for sure) consume APIs that the response looks like this:

{ id: 123, name: "foo", vehicles: [ { model: "sedan" }, { model: "truck" } ] }

In order to support the "vehicles" list attribute, you must define your RestTemplate Bean like this:
`@Bean

public RestTemplate restTemplate(){
    RestTemplate restTemplate = new RestTemplate();
    MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter = new MappingJackson2HttpMessageConverter();
    mappingJackson2HttpMessageConverter.setSupportedMediaTypes(Arrays.asList(MediaType.APPLICATION_JSON, MediaType.TEXT_HTML));
    restTemplate.getMessageConverters().add(mappingJackson2HttpMessageConverter);
    return restTemplate;
}`

There's a lot of questions (like this) in stackoverlow .

I really think that if you're writing a new app, probably you'll need to parse nested json and it's a problem if the Guide only provide the basic feature of plain jsons. If you think that it's a good idea, i can help with the new lines of the Guide.

Thanks!
Regards,
Fede.

Centralized Configuration - missing git command

Hi,

I succed to build client\server according to the guide of centralized configuration and found 2 issues
1.It's not clear that each parameters in the properties file must have method in the client, eg -
param address=NY
and method -

@RequestMapping("/address")
String getAddress() {
    return this.address;
}

2.To upload the a-bootiful-client.properties to the git, need to run first
git add a-bootiful-client.properties and than
git commit,
otherwisw the server will not recoginze the file.

thanks,
Assaf

guide for Spring and Angular, from a new user's perspective

Hi, I wrote the five episodes of a guide for new users a few weeks ago. I was written on my beach time and several (new) pivots here in Santa Monica have used it. I am currently on a project so I don't have time to work on it right now, but I wanted to let you know that it is out there. There is a half-finished episode about encryption that I hope to finish later this month.
http://dotted-pair.blogspot.com/p/this-is-springdo-tutorial-overview-page.html

thanks,
Dirk (also djanssen@)

The guide "Accessing Data with Neo4j" skipped the source code

Thanks for the excellent introduction for Neo4j.
Could you please add the source code of ApplicationConfig class to the guide?
I was a bit coufused when ./gradlew bootRun threw an UnsatisfiedDependencyException caused by missed ApplicationConig class with Neo4j annotations.

Add non Spring-Boot powered guides

A couple of days ago this thread arose on StackOverflow. I think they have a point, although most of us like Spring Boot it would be nice to still have a couple of plain guides for Spring Framework (or related projects). Most projects still use plain Spring (with some of the portfolio projects) and not Spring Boot.

I think the current guides are great and really allow the reader to focus on the root content of the guide and not being distracted by the setup around that (datasources, connection factories etc.).

Create guide for paging and sorting

Show repository-level paging/sorting usage, then carry over to Spring data REST.

  • Include deep links into reference docs for more details.
  • Ensure it works for using the programmatic interfaces as well as SDR in the guide.
  • Cross link to other spring-data guides.

Getting Started Consuming REST AngularJS not pulling in data correctly

So http://rest-service.guides.spring.io/greeting is up and running

{
   id: 415,
   content: "Hello, World!"
}

but runninggs-consuming-rest-angularjs-complete (obtained thru STS 3.7.1 File > New > Import Spring Getting Started Content) thru the app.groovy (with Spring CLI v1.2.7.RELEASE) doesn't pull in dynamic content to be rendered.

Expected when visiting http://localhost:8080/
The ID is 415

The content is Hello, World!

Actual

The ID is

The content is

Accessing Data with MySQL Not Working

I've imported the project directly into Eclipse and have not modified a thing. When I run the project I get the error:


APPLICATION FAILED TO START


Description:

Field userRepository in hello.MainController required a bean of type 'hello.UserRepository' that could not be found.

Action:

Consider defining a bean of type 'hello.UserRepository' in your configuration.

Java code blocks are broken

Here it is:
screen shot 2017-11-27 at 15 45 45

Steps to reproduce: go to any tutorial (e.g. https://spring.io/guides/gs/spring-boot/) and scroll to any Java code block.

P.S. It's already 5 days since I caught this trouble, I tried to report everywhere I could (contacted Spring team twitters / facebooks, Pivotal official support etc.). You guys have to improve feedback possibilities because there is no public way to contact you directly.
Thanks to Pivotal twitter I'm here.

code of "Accessing JPA Data with REST" is not working on (maybe) jave 9.

I was running code of "Accessing JPA Data with REST". and I got the following error message.

My development environment:

  • java 9.0.4
  • intellij community edition 2018.1

Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582) ~[na:na]
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185) ~[na:na]
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496) ~[na:na]
... 27 common frames omitted

I think, maybe, that Java 9 no longer provide classes such as JAXB etc.
I've added and fixed the following code. The program is running.

    <dependency>
        <groupId>javax.xml.bind</groupId>
        <artifactId>jaxb-api</artifactId>
        <version>2.3.0</version>
    </dependency>

I referenced this comment:
https://stackoverflow.com/questions/43574426/how-to-resolve-java-lang-noclassdeffounderror-javax-xml-bind-jaxbexception-in-j?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

Thank you.

Improve the guide for building maven projects - email issue

The guide Building Java Projects with Maven has a few places which would trip up a beginner programmer. I'd like to edit this to hopefully improve it. But, when I went to the contribution agreement I saw a warning that my email would be accessible to Pivotal, is that correct ?
I don't want to provide an email that is accessible and readable to Pivotal - but I'd still like to contribute

A SpringBoot service to upload files into Amazon S3

A SpringBoot service (microservice) that polls a input directory waiting for files to upload and store to Amazon S3 in a secure way.

I work in a enterprise is moving towards hybrid architectures that need these kind of services. I expect others would need too (without buying a giant commercial product able to do that)

Regards
Enrico Mazzarella

when i use eureka ,config-client enter /refresh is 404

i use config-server with eureka ,and config-client get config from eureka by config-server's service-id.
i can get the value ,After i change the value from Git, i enter /fresh,it is error code 404.
i look for /fresh from log.it don't exist.
i confirm that i use true POM.

config-server's POM use spring-boot-starter-web,spring-cloud-config-server,spring-cloud-starter-netflix-eureka-client.

config-client's POM use spring-boot-starter-web,spring-cloud-starter-config,spring-cloud-starter-netflix-eureka-client,spring-boot-starter-actuator

can you help me?

'start from scratch' sections are not getting revealed

Most of the guides with 'start from scratch' section are not getting revealed when you click on them like 'Build with Maven', I opened the console and found the following error:

Uncaught TypeError: Cannot read property 'innerHTML' of null

more specifically on main.js line 1867 after prettifying :

       var a = {
                ready: function() {
                    var a = null;
                    e("pre").addClass("prettyprint").each(function(b, c) {
                        a = c.firstChild,
                        a.innerHTML = f.prettyPrintOne(a.innerHTML) // HERE
                    })
                },
                destroy: function() {}
            };

using Chrome version 60.0.3112.113

Building a RESTful Web Service with Reactive Spring

Build a service using Spring Boot 2.0 and Spring Framework 5.0 to show new funtionality in Reactive Spring.
Time delays will be introduced to show non-blocking feature while CRUDing data from MongoDB using its reactive driver.

Edgware.SR2 Spring Cloud Release took place

Spring Cloud [Edgware.SR2] Released with the following projects:

spring-cloud-task : 1.2.2.RELEASE
spring-boot-dependencies : 1.5.10.RELEASE
spring-cloud-consul : 1.3.2.RELEASE
spring-cloud-zookeeper : 1.2.0.RELEASE
spring-cloud-config : 1.4.2.RELEASE
spring-cloud-stream : Ditmars.SR3
spring-cloud-cloudfoundry : 1.1.1.RELEASE
spring-cloud-dependencies : 1.3.8.RELEASE
spring-cloud-vault : 1.1.0.RELEASE
spring-cloud-netflix : 1.4.3.RELEASE
spring-cloud-security : 1.2.2.RELEASE
spring-cloud-sleuth : 1.3.2.RELEASE
spring-cloud-commons : 1.3.2.RELEASE
spring-cloud-aws : 1.2.2.RELEASE
spring-cloud-contract : 1.2.3.RELEASE
spring-boot-starter : 1.5.10.RELEASE
spring-cloud-build : 1.3.8.RELEASE
spring-cloud-bus : 1.3.3.RELEASE
spring-boot : 1.5.10.RELEASE
spring-cloud-gateway : 1.0.1.RELEASE

Guide for spring data elasticsearch

Hi, I have written a guide for Spring Data Elasticsearch. It performs the following:

 - Sets up elasticsearch cluster in the local machine.
 - Stores data in the form of documents in the elasticsearch index
 - Searches through the index for documents based on Spring data elasticsearch query method.

https://github.com/amriteya/getting-started-guides/tree/elasticsearch

Could someone from the core contributors team review it and guide me as to how to send a PR for this?

Default value for "required" param in @RequestMapping annotation

The guide at https://spring.io/guides/gs/rest-service/ and the docs (http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/bind/annotation/RequestParam.html#required--) say that the "required" param in the org.springframework.web.bind.annotation.RequestMapping annotation has a default value of false.
In spite of that, when I run a project without specifying a value it defaults to true.
In netbeans, when I checked the downloaded sources from Maven, the default is set to true.

There seems to be a contradiction there.

image

Missing horizontal scroll at text wrapped by back quotes in adoc files

The horizontal scroll is mostly missed at file paths on spring.io website. It's OK with PC browsers (unless you increase a font way too much) but horrible on mobile devices (see the path to UserNotFountException class on the screenshot - it lacks horizontal scroll at a panel with piece of code too but it's there).

image

Typo in quick-start guide

In this guide [1] there is a small typo issue with the artifact, which is wrong:

<dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-framework</artifactId>
        <version>4.0.5.RELEASE</version>
    </dependency>

and I believe it should actually be:

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-context</artifactId>
    <version>4.0.5.RELEASE</version>
</dependency>

There is no "spring-framework" artifact and the guide text mentions "spring-context" instead.

[1] https://github.com/spring-guides/getting-started-guides/issues

Authenticating a User with LDAP guide has multiple errors

The 'Authenticating a User with LDAP' guide - https://spring.io/guides/gs/authenticating-ldap/ has some errors that need to be corrected:

  1. The 'Application.java' class definition is repeated with no difference between the two; so the second one is unnecessary.
  2. The 'WebSecurityConfig.java' class has incorrect annotations used, which are now deprecated. The annotations below the code(i.e. in the description) are correct, but in the code are wrong.

Wrong import:
import org.springframework.security.config.annotation.web.servlet.configuration.EnableWebMvcSecurity;

Correct import:
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;

Also the annotation 'EnableWebMvcSecurity' on line 11 needs to be changed accordingly.

Spring boot caanot be resolved to a type errors are coming after using all spring boot dependcies used as suggested in given exmple.

Spring boot 'cannot be resolved to a type' errors are coming though spring boot dependencies are copy pasted from given example.

My Error in Application class :
' org.springframework.boot.SpringApplication' cannot be Resolved
'org.springframework.boot.autoconfigure.SpringBootApplication' cannot be Resolved.
etc

My Pom.xml : (copy pasted from given exm)

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>org.springframework</groupId>
	<artifactId>gs-rest-service</artifactId>
	<version>0.1.0</version>

	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>1.5.3.RELEASE</version> <!-- tried with 1.5.2.RELEASE also-->
	</parent>
	<dependencies>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-test</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.jayway.jsonpath</groupId>
			<artifactId>json-path</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<properties>
		<java.version>1.8</java.version>
	</properties>


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

	<repositories>
		<repository>
			<id>spring-releases</id>
			<url>https://repo.spring.io/libs-release</url>
		</repository>
	</repositories>
	<pluginRepositories>
		<pluginRepository>
			<id>spring-releases</id>
			<url>https://repo.spring.io/libs-release</url>
		</pluginRepository>
	</pluginRepositories>
</project>

Provide a dependency management and dependency upgrade guide

I'm not 100% sure that a guide is the right place for this, but I think it warrants some discussion and a guide feels a better fit than reference documentation. It relates to this Spring Boot issue and this answer on Stack Overflow by @olivergierke.

A guide could help beginners with Maven and Gradle dependency management, explaining how to upgrade to new versions of Boot (and perhaps Cloud as well), and how to override the versions of individual dependencies.

The 'handling-form-submission' guide needs a non-thymeleaf jsp version of the guide

The 'handling-form-submission' guide needs a non-thymeleaf, jsp version of the guide

https://spring.io/guides/gs/handling-form-submission/

The "form submit" guide should have a GOAL of BEING EASY but, as a beginner, I had great difficulty reconciling other jsp Spring examples of form submission (found around the internet) with this guide. Basically, if I say it another way, your site does not currently a "form submit" example in your guidebook that shows how to do a form submit the standard way, using jsp (non-thymeleaf/html template).

Also, I think I would find the guide better if it did not use spring-boot , and instead just did it the traditional way. I think the guide would be easiest using a .xml spring config, but an annotated config would be acceptable. Additionally, if there is more than 1 way to submit a form, there should be 1 controller for each example.

The method setApplicationContext(ApplicationContext) is undefined for the type MessageDispatcherServlet

public ServletRegistrationBean messageDispatcherServlet(ApplicationContext applicationContext) {
		MessageDispatcherServlet servlet = new MessageDispatcherServlet();
		servlet.setApplicationContext(applicationContext);
		servlet.setTransformWsdlLocations(true);
		return new ServletRegistrationBean(servlet, "/ws/*");
	}

In the above method,
servlet.setApplicationContext(applicationContext);

gives an error

The method setApplicationContext(ApplicationContext) is undefined for the type MessageDispatcherServlet

when checked the API of MessageDispatcherServlet, there isn't any method setApplicationContext.

Please Help.

@Transactional is not working for marklogic database

Hi Team,
I am big fan of spring team you people are very innovative. I am always exited about spring new features.

I am doing poc to know how exactly distributed transaction management working with @Transactional.
It is working fine in distributed environment but it is supporting most of the data bases except marklogic .
These days many organizations are using marklogic widely , It would be grate if your respectable team implement this one as well.
can you suggest me the way to integrate marklogic to distributed transaction i will implement that, at least it can help me alot.

Thanks of Phenomenal Team!

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.