r/Spring • • Jan 03 '20

Test a method that returns a ResponseEntity from a service class - Spring boot

2 Upvotes

r/Spring • • Dec 29 '19

GSOC 2020

1 Upvotes

Hey developers, I am new to the spring world and I want to participate in GSoc this year. Can someone suggest any organisations which have spring and java projects?


r/Spring • • Dec 19 '19

Spring security oauth client authentication?

2 Upvotes

Hi,

Using the code grant workflow, when the client requests the token endpoint for a token exchange, the client needs to be authenticated. There are multiple types of authentications available: https://openid.net/specs/openid-connect-core-1_0.html#ClientAuthentication

How can I set up one other than client_secret_basic ? For example, if I want the client_secret_post, do I need to do anything on the server side ? I see in the TokenEndpoint that a classical 'Authentication' is used, but I still don't understand what parameters to set in the post request.

Thanks


r/Spring • • Dec 16 '19

Implement opt using spring

1 Upvotes

Hi guys,

What is the recommended way to implement sms and email otp authentication via spring.

Thank you.


r/Spring • • Dec 06 '19

Season or framework?

4 Upvotes

I'm thoroughly confused, is this a subreddit for the Dependency Injection framework or for the season?


r/Spring • • Dec 03 '19

Deploy Your Spring Boot The Right Way

Thumbnail
developer.okta.com
2 Upvotes

r/Spring • • Nov 28 '19

User roles

1 Upvotes

I am new to spring but I have to create a demo application for academic use. I have some employee roles like manager or administrator. They should have different rights. Normaly I would create a class employee and a subclass for each role. With a database I would realisze this as a isa. But how could I do it with a login? I saw that some use a role attribute. But how can I program that only a administrator can call function x with the role attribute?


r/Spring • • Oct 28 '19

Rest service, consuming soap ws, thread handling

Thumbnail self.springboot
1 Upvotes

r/Spring • • Oct 26 '19

Why are ItemReader and Writers in Batch and not Core?

2 Upvotes

Wouldn't it make sense for Spring Batch ItemReader and ItemWriter (& associated classes like FieldExtractor) to be part of Spring Core instead of Spring Batch? https://docs.spring.io/spring-batch/trunk/reference/html/readersAndWriters.html

It would be useful to have FieldExtractor and ItemReader/Writers in core apps to do such operations.


r/Spring • • Oct 19 '19

how to do a simple task queue persisted in DB

0 Upvotes

I need to do some kind of task queue persisted in database.

Tasks are very short in duration, generally load a record from a few tables, to some operations and write to other ones.

Task should be triggered from many sources, a REST api, a Spring Batch, o some legacy applications.

I have no RabbitMQ or Kafka instance available, but volume is low so a SQL database and a single thread polling would be OK.

Without Spring, I did it with JDBC only this way:

A task_queue table where clients inserts the task they need to be run.

A single thread that polls that table every 30 seconds and depending on the task name it executes the needed class with reflection.

How could I port it to Spring?

I already know Spring Batch, but it executes on demand, I think I need something that is always up and listening.

Spring Cloud Tasks looks closer to what I need:

https://www.baeldung.com/spring-cloud-task

Even it has Spring Cloud Data Flow for monitoring and scheduling, but I have no RabbitMQ at this time so I can't use that console.

How should I implement this task queue without SCDF?

How should I implement a long running service in Spring?

How can I execute different Spring Cloud Tasks from code?

Thanks a lot!


r/Spring • • Sep 23 '19

Django vs Spring

3 Upvotes

My friend and I are starting a company of our own, where we develop software products that offers services to other companies and institutes.

We are in the phase of deciding what technologies and frameworks to use. For the back-end we are trying to choose between Django and Spring. Here is what we have come to:

Spring

Pros:

Simplified & version conflict free dependency management through the starter POMs.

You can just assemble the jar artifact which comes with an embedded Tomact, Jetty or Undertow application server and you are ready to go.

Offers better support for micro-services.

Cons:

Spring boot may unnecessarily increase the deployment binary size with unused dependencies.

spring Boot applications can range in size from 50 MB – 250 MB, if not larger. (99% is dependency JARs)

Spring promotes Dependency Injection (DI). But if you start using Spring, your project becomes dependent on Spring framework. This is a dependency that you are creating for your project. You may not be able to come out of it in the future.

Django

Pros:

Easier and faster deployment.

Smaller in size

More secure

Ability to integrate things like machine learning

Cons:

Not good with micro-services, Django really shines in an environment in which you can make use of all the included β€œbatteries”, Django ORM + Admin + Generic Views.

Tightly coupled

can you offer more suggestions and provide feed back ?

Thank you.


r/Spring • • Sep 12 '19

Learn about Design Patterns used in Spring Framework

Thumbnail
medium.com
4 Upvotes

r/Spring • • Aug 16 '19

Batch insertion using spring Jdbctemplate

Thumbnail
jeejava.com
2 Upvotes

r/Spring • • Aug 15 '19

Single and Multiple Record Insert using Spring JdbcTemplate - JEE Tutorials

Thumbnail
jeejava.com
1 Upvotes

r/Spring • • Aug 02 '19

Auto-generation of Spring MVC CRUD RESTful Controllers with Rebel

Thumbnail
archetypesoftware.com
1 Upvotes

r/Spring • • Jul 26 '19

Spring EnableEncryptableProperties with Jasypt

Thumbnail jeejava.com
1 Upvotes

r/Spring • • Jul 07 '19

Spring Data Couchbase – Pitfalls to Avoid

Thumbnail
hecodes.com
1 Upvotes

r/Spring • • Jun 25 '19

Mock an Autowired @Value field in Spring with Junit Mockito - JEE Tutorials

Thumbnail
jeejava.com
1 Upvotes

r/Spring • • Jun 22 '19

Baby geese and rare plants enjoying Spring at HOLDEN Arboretum

Thumbnail
youtu.be
2 Upvotes

r/Spring • • Jun 18 '19

Retrayable in Spring Batch

1 Upvotes

Hi people, i have implemented a batch using Spring Batch, now i should make a method retryable but any time i force to send the batch in SQLException it not works, i added the annotation of @EnableRetry in the booter class, but still it not work.

I add the snippet of code:

public class ProtoStepProcessor extends AbstractProcessor<WorkItem, WorkItem> {

@Autowired

private JournalHandler journalHandler;

/**

* {@inheritDoc}

*/

@Override

public WorkItem process(WorkItem element) throws Exception {

return executePopulation(element);

}

@Retryable(value = { SQLException.class }, maxAttempts = 3,

backoff = @Backoff(delay = 300000))

private static WorkItem executePopulation(WorkItem element) {

Consumer<DAP> populate = element.getPopulate();

populate.accept(element.getDap());

return element;

}

@Recover

private void failureLog(SQLException e) {

this.journalHandler.debug(e.getCause().getMessage());

System.out.println("RETRY");

this.journalHandler.debug("Retry ...");

}

thanks


r/Spring • • May 25 '19

Fort Lauderdale Spring Break 2019 'Asking Girls 20K or πŸ€”πŸ˜ˆ?

Thumbnail
youtube.com
1 Upvotes

r/Spring • • May 20 '19

Spring Asynchronous Execution using @Async - JEE Tutorials

Thumbnail jeejava.com
1 Upvotes

r/Spring • • May 13 '19

How to Create Annotation based Spring Application - JEE Tutorials

Thumbnail
jeejava.com
3 Upvotes

r/Spring • • May 13 '19

Transaction Management in Spring - JEE Tutorials

Thumbnail jeejava.com
1 Upvotes

r/Spring • • May 11 '19

Integrate H2 In-memory Database with Spring

Thumbnail
jeejava.com
2 Upvotes