I want to inject angular6.0 to grails 3.3.0,the detail is I have 2 project,the first is angular6.0 project for frontend,and the second is grails3.3.0 for backend provide http service.
angular project have some simple pages,just like
http://localhost:8080/
http://localhost:8080/project-list
http://localhost:8080/download
I get some idea from this article.
when the angular project finished,I run build and get a dist folder,I copy all files and folders under dist to grails under src/main/webapp
enter image description here
then start grails service in IDE.OK I can visit http://localhost:8080/, but all request for static pictures I get 404.
enter image description here
when I run grails war script and run it use 'java -jar',I can visit http://localhost:8080/ and all request for pictures is OK,great.
but if i refresh the page of 'http://localhost:8080/project-list',I get 404 and I know why,but I do't know how to resolve it.
anybody help?thx
some days later,I get some idea,not good but can resolve some problem.
first of all,the angular project should run with #(maybe means hash,sorry I'm not sure)in url,just do this
RouterModule.forRoot(routes, {useHash: true})
it's not enough,if you just do like that,you may get some error when you run your angular project in dev env,just like https://github.com/angular/angular-cli/issues/10582, I have no idea,but if you start the project with -aot just like
ng serve --aot
error is gone.
build the angular project and copy the dist folder in to grails,and start grails project,the static pic is still not ok,no idea. when you execute 'war' and use 'java -jar' to run the war file,when you visit http://localhost:8080,everything is ok.
that's all,if you have some good idea,please tell me,thx before.
Related
Swagger 3 ? or Open API ..? 3? not sure what they're calling it. There doesn't seem to be a good or easy setup.
I'm looking to add it to my java project
I don't mind manually filling out the config for my controllers and in fact do not want it dynamically config'd
and I don't want a lot of extra fluff with it.
Their github hosts a number of different files and I'm not sure what I do and don't need.
The setup at:
https://github.com/swagger-api/swagger-ui/blob/master/docs/development/setting-up.md
I've run through the setup commands and started locally which returns 2 js files, 1 css, and the swagger.json.
Does anyone know if there's a gradle or maven import / line that I can just plop into my build and get the code I need?
Has anyone setup swagger 3 with just the bare minimum to host the ui page with their controller on a java/springboot app?
any help welcome.
git clone https://github.com/swagger-api/swagger-ui.git
cd swagger-ui
npm install
npm run dev
I just installed Dart Editor on Ubuntu 14.04, opened the Sunflower demo, right clicked on sunflower.html, chose Run in Dartium, and was faced with "Could not start pub serve or connect to pub." So I went to Google and found the following reasons why this happens:
"Run in Dartium" doesn't invoke "pub serve" correctly for Dart files that aren't in web/ or test/ (But the Sunflower demo files are all in web/)
https://code.google.com/p/dart/issues/detail?id=18990
Project files must be inside "C:\Users[username]\dart" instead of "C:\progs\Dart\projects" (Doesn't help; I'm not on Windows, but would demos that come with Dart Editor be in the wrong place?)
https://code.google.com/p/dart/issues/detail?id=19659
Same problem in recent release shows up on Mac OSX, bug fix promised in that next release (Doesn't help; I'm not on Mac OSX and that next release already came)
https://code.google.com/p/dart/issues/detail?id=19143
Another service is listening on port 8080 (Nope, I checked the ports and also made sure nothing with dart pub serve was already running, plus rebooted a couple of times)
dart error - could not start pub serve or connect to pub
So I found more information that gave me the idea to try pub serve from the command line. So I went to the directory where the sunflower project was placed by the Dart Editor (where the pubspec.yaml is found) and in the command line I typed:
sudo /opt/dart/dart-sdk/bin/pub serve
Which resulted in:
You don't have a lockfile, so we need to generate that:
Resolving dependencies... (1.1s)
Downloading browser 0.9.1...
Got dependencies!
Loading source assets...
Serving sunflower web on http:// localhost:8080
Build completed successfully
Great, I thought, so I opened Chrome and visited http:// localhost:8080 and saw this:
404 Not Found
Could not find asset web in package sunflower.
And in my command line console I saw this:
[web] GET / → Could not find asset sunflower|web.
[web] GET /favicon.ico → Could not find asset sunflower|web/favicon.ico.
I am about to get more aggressive with my Google search and investigation, but I thought I would have this question out here just in case I cannot find the answer. Even though I encounter many obstacles before running my first Dart demo, which makes for a poor introduction (I know, Dart is new), I keep liking what people say about it and I am compelled to get this working. Please help me like Dart. :)
Much appreciated!
I came across similar error and this solved it for me:
1) Move all html/css/dart files to /web directory.
2) Than create a pubspec.yaml with your projects dependences (usually it's "browser" only).
You may try like this, [run]-->[Manage Launches], then unmarked "Use pub serve to serve the application", good luck!
I'm trying to get TFS to automatically publish (not package at the moment) my web app on a build to a Win2k3 server with IIS6. The remote agent service is started.
The build fails giving me a 401. I'm now trying to manually run a cmd line from the build server itself (just incase the MSBUILD was doing something strange with the params set on the build definition) and it's giving me the same thing. Here is the command I'm trying to run:
msdeploy.exe
-source:contentPath='C:\Builds\1\Test\DummyTFSWebApp Submission Build\Binaries\_PublishedWebsites\DummyTFSWebApp'
-dest:contentPath='Default Web Site',
computerName='http://ipm-vm-dev/MSDEPLOYAGENTSERVICE',
userName='Domain\AdminUser',
password='Password',
authType='basic',
includeAcls='False'
-verb:sync -allowuntrusted
But like the build report, it's giving me:
I can't understand why! The username & password provided is an Administrator on the destination machine. I've even made the build server machine and admin (clutching at straws), and I've made the destination folder a share for everyone with write permission.
Help appreciated as this is really frustrating me!
I changed the authType='NTLM' and it now works!
/p:AuthType=NTLM
I am trying to deploy the sample-app war file that comes with PushSDK.But was not able to deploy the application successfully.Steps followed till now
1) I was able to configure PushSDK.properties log4j.xmlbut didn't change value of ${sampleapp.appid} in sample-app-context.xml.
2)then made the war file using cmd
3) Deployed on the server.
during deployment an error was coming.
Invalid bean definition with name 'registerListeners' defined in class path resource [sample-app-context.xml]: Could not resolve placeholder 'sampleapp.appid'
Tried to register on link but was unsuccessful
I have just started down the path of using the Push SDK, but from what I've read I conclude that you need to get your development registration completed at least before you can run the sample code; unles you're using your own BES.
I am beginner for symfony. I have to configure the already developed project that is built using symfony. I changed the database information but when browse localhost/myproject/web there is nothing displayed. What can i do to configure the project in local server. I have created the database as well. Hope to get help. Thanks ..........
you need to point apache to the web folder in your symfony project. or if your project reside inside apache web root you could use:
http://localhost/myproject/web/index.php but that won't show any errors. insted of that you could use:
http://localhost/myproject/web/frontend_dev.php where frontend is the name of front controler ( this file is in web/ folder).
and if then you don't get any output look into your apache server error log to find why project isn't working.
few resolves:
when in symfony project root execute this in command prompt:
php symfony cache:clear
php symfony fix-perms
and then try url above.
more info here