How it works? Google app engine + Spring - spring

I wonder how spring and google app engine work together
I know that google app engine cannot run threads.
I think spring is working with threads.
(if i'm wrong, please correct)
So how spring and google app engine work together.

I have used Spring Framework in Google App Engine and it worked just fine. So its not using threads to atleast to controllers etc. normal web application stuff. Most likely Spring cron tasks use threads, so instead of those you most likely have to use App Engines own cron task service.

According to the "Will it play" of GAE, Spring MVC is supported. I'm not sure if this is what you mean. I have tried running Grails application (which is built on top of Spring) on GAE and it works fine. If you are creating your application from scratch, be sure to read the issues related to Spring and related framework addons like the Spring Security and Spring ORM, and some customization you need to perform or additional coding for Google's storage system. Check out their group for more info.

Related

Azure Active Directory in Spring App Without Boot

I have been trying to set up a Spring Web application to use Azure Active Directory.
All the samples that I have found online are based on Spring Boot, is there a simple example that shows setting up spring framework web app only without using Spring Boot?
I am having no luck finding stuff, I am also trying to figure out how to convert all the spring boot autoconfig. Surely there is a sample somewhere that makes it easy to use for a Spring Framework only web-app?
I was able to figure this out somewhat. I'm very new to OAuth so still trying to learn as I go.
Basically I followed the Spring Reference and got things working using the override auto-configuration sections at https://docs.spring.io/spring-security/reference/servlet/oauth2/index.html
It also helped that I updated the Spring Framework versions to the latest and made sure I used the correct dependencies according to that reference site

I am developing a website I know bootstrap and learned spring I want to know what else can be done to make it better?

I want to know what spring dependencies should I use on my website to make the work easy and spring or spring boot which one is better. also, suggest some frontend technologies that I can use to make the website smart.
It's a very broad question. And it all depends on what features you want in your web site. Just listing few basic module to give you some hints.
Spring MVC - For web application with MVC Pattern
Spring Security - To secure your app
Spring ORM - If using any ORM tool like hibernate
You need to explore more on the basis of your need.
Spring Boot vs Spring:
You should use Spring Boot if you are starting new project. Spring Boot came to make development process easier when using Spring Framework. In Spring, developer had to write lots of code to configure beans and dependencies. Spring Boot automated this process so that you no longer do it by yourself but Spring Boot will take care of it. Plus it provides some extra tools (In built Web Server, in Memory DB, tool to monitor and manage Spring Boot App )
Try to create a simple web app in Spring and Spring Boot to understand the difference.
Front-end Technologies:
JavaScript based framework/lib like Angular,React,Vue etc. are the trend for front-end now a days. Again there are pros and cons of each of them. Hence you need to evaluate, what suits you better as per your requirement.

spring-security, testing the filter chain without webapp

We are using spring-security in many applications with the same configuration. So we have created a library for it.
But today I have to changes many things in this library and I would like to test it so that I'm sure to not breaking anything.
Is it a way to test the filter chain and other spring-security components (like DetailsSource) without a web application ?
Thanks a lot
Spring security has very convenient API for testing with spring mvc testing
http://docs.spring.io/spring-security/site/docs/4.1.3.RELEASE/reference/htmlsingle/#test-mockmvc

What are the parts of the Spring framework that does work with Appengine

Right now, I have been facing so much issue running some parts of the Spring Framework, like I have no problems running my Appengine web app with Spring MVC however have so many issues running Spring Data on top of Appengine.
I wan't to know which part of the framework have been tested to work with Appengine (AE)?
Does Spring Security work with AE?
Does Spring Data work with AE?
I'm guessing that there is no planned support for these frameworks at all for AE. However, hopefully I'm wrong.
I would suggest looking here: https://code.google.com/p/googleappengine/wiki/WillItPlayInJava
Spring Security is listed as SEMI-COMPATIBLE.
As for Spring Security, it works great. You'll just have to enable sessions. And if you want to apply the SPring filter on static files, make sure to exclude them from the static resources in appengine-web.xml.
As for Spring Data, I've never tried it but you might be able to use the JPA and REST sub-projects at least.

App Servers or Web Server for Spring Framework

first of all: that might be a newbie question. However after few searches I cannot find anything that would bring me further.
Basically what would be the reasons to choose an app server over a Spring framework to develop a medium complex web application? I am fairly new to Spring, did some hard core WebSphere for few years. While reading about Spring I see that it comes with a good bunch of features (transactions, persistence, messaging, connectors etc). Is Spring hard to scale or manage in a clustered environment?
Any comments welcome.
Thanks
Spring is awesome.
Your terminology is way off though. Spring is a Framework. It's a library that you use to write a web application.
An app Server is what your application runs in. You need both. For example, use the Spring Framework to create an app that runs in the Tomcat app server.
EAR files aren't a requirement for doing Java EE development.
It's not either/or: if you deploy a Java EE application you need a container of some kind.
I've deployed Spring apps on Tomcat and WebLogic. I think WebLogic is the best Java EE app server on the market. My decision about whether to deploy to it or not would be based strictly on availability.
You've seen that Spring has their own Java EE container now. It forks Tomcat and marries it with OSGi and Spring. I haven't tried it yet, but if the quality is similar to their framework it will be very promising indeed.
Are you really asking "When would I write an application using Spring? When should I choose EJB3?"
My preference these days is Spring. I can do persistence, transactions, messaging, web services, and everything else I need.
Bpapa,
you got me there, yes the terminology is wrong. I meant Spring + web container vs. App Servers. Surely the web app has to be deployed somewhere. I guess that shifts the question to the server side features as per my first post.
Topology example: Spring + Tomcat vs. WebSphere.
As a side note: people argue if Tomcat is an app server, many consider it rather a web container. You could not deploy an EAR file to Tomcat, can you? All it takes is a WAR, am I right? But that gets too academic.
Thanks a lot
Rod Johnson's "Expert 1:1 Java EE Development Without EJBs" is the basis for Spring. It's an excellent book, but I'd say it's a bit out of date now. The book was written with EJB2 in mind. It was published before Spring became an open source project. The framework is up to version 3.0 now, so I'd say that the book is of historical interest only. I'd recommend a more modern take on the question that takes Spring 3.0 and EJB3 into account.
%

Resources